Imports data from files into a database.
This cmdlet imports data from the following file formats: Text, XLS, MS Access, XML, JSON, CSV, ODBC, and DBF.
Invoke-DevartDataImport [-Connection <object>] [-Create <SwitchParameter>] [-InputFile <string>] [-InputTable <string>] [-Table <string>] -TemplateFile <string> [<CommonParameters>]
Specifies the database connection to use. You can provide one of the following options:
DevartDatabaseConnectionInfo object that contains detailed connection settings.-Connection <object>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Creates a new table to import the data into.
-Create <SwitchParameter>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | False |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies a file with the data to import. The option is unavailable when using an ODBC format.
-InputFile <string>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies a source table or view to import the data from. The option is available only for MS Access and ODBC formats.
-InputTable <string>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies the destination table for the imported data.
-Table <string>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies a template file (.dit) containing data import settings.
-TemplateFile <string>
| Property | Default value |
|---|---|
| Required | True |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
<CommonParameters>
This cmdlet supports these common parameters:
Verbose – Provides detailed output about the command operation.Debug – Provides debugging information.ErrorAction – Specifies how to respond to errors.ErrorVariable – Stores error messages in a variable.WarningAction – Specifies how to respond to warnings.WarningVariable – Stores warning messages in a variable.InformationAction – Specifies how informational messages are handled.InformationVariable – Stores informational messages in a variable.OutBuffer – Controls the number of objects buffered before output.PipelineVariable – Stores the current pipeline object in a variable.OutVariable – Stores output objects in a variable.For more information, see About Common Parameters.
System.Boolean (returns true on success and false otherwise)
System.Boolean returns:
true if the operation was successful.false if the operation failed.Invoke-DevartDataImport -Connection $connection -TemplateFile "C:\Temp\template.dit"
For information on additional command-line options, see Switches used in the command line.