Import From DataTable
Description
The Import From DataTable activity bulk inserts rows from an IbDataTable into a database table.
IbDataTable is the common tabular data structure used across IB-X. This activity enables tabular data produced by different activities and data sources to be directly imported into a database table.
For example, the source IbDataTable can come from:
- Database query results
- CSV files
- Excel worksheets
- Google Sheets
- Word tables
- Other IB-X activities that produce
IbDataTableoutput
This makes it possible to transfer data from different sources into a database without requiring intermediate data conversion.
Common settings
Use Process Data to bind supported inputs to workflow values or upstream outputs. See Common Activity Features for shared execution, error-handling, and output-persistence settings. Availability depends on the activity.
Design-Time Configuration
The following properties define how the activity connects to the database and imports the data.
Connection Type
Specifies the database engine (for example, SQL Server, Oracle, MySQL, PostgreSQL). Selecting the correct type ensures compatibility with the target database.
Connection Name
Select a preconfigured database connection that defines the server, credentials, and security settings.
Schema
Specifies the database schema that contains the target table.
Table Name
Specifies the database table into which the rows from the DataTable will be inserted.
DataTable
Required source IbDataTable, such as the output of Read From CSV, Read Cell Range, or Execute Query. Bind the whole table, not one row or a JSON string.
Column Mapping
Defines how columns from the source IbDataTable are mapped to columns in the target database table.
Use the Resource Mapper to map each source DataTable column to the corresponding target database column.
Ensure that the mapped source and target columns use compatible data types. Incompatible values may cause the import operation to fail.
Batch Size
Specifies the number of rows processed in each batch during the bulk insert operation.
For large DataTables, processing records in batches can help manage database and system resource usage.
Set the value to 0 to allow the database provider to process the complete DataTable without explicitly specifying a batch size.
Timeout
Specifies the maximum time (in seconds) that the activity will wait for the import operation to complete.
The default value is 600 seconds.
Outputs
Inserted Records Count
Returns the total number of records successfully inserted into the target database table.
This value can be used for:
- Validation
- Reporting
- Conditional workflow logic
Execution settings
Configure Wait All Incoming when execution paths converge, and On Error for failure handling. Select Inherit where available to use the workflow-level error policy.
Example: Import selected source columns
Read a CSV into a DataTable, then select the target database connection, schema, and table. In Column Mapping, map the source Customer column to the database CustomerName column and source Amount to OrderAmount.
Map the required source/target pairs and supply compatible values for mandatory database columns. Database-generated identity columns are excluded from the import. Set Batch Size to 0 to let the provider handle batching, or a positive size for explicit batches.
After success, compare Inserted Records Count with the expected source row count. A failed import does not guarantee that earlier database work was rolled back; check the destination before retrying an operation that might duplicate rows.