Load Data into Database Module
The Load Data into Database Module loads a data set from a source database into a target database. It's a handy tool if your data is distributed across different database systems and you need to perform multi-source comparisons. Simply load the data from various database systems into one system and then run your tests.
You can also use the Module as a preparatory step for Reconciliation tests. The target into which you load your data sets becomes the new source of your data, and you can reconcile it with a different data set.
The Load Data into Database Module is part of the Tosca Data Integrity Modules And Samples.tsu subset.
Limitations
When it comes to loading data, keep the following things in mind:
-
Moving data around extensively is not a best practice. Try to limit the data sets you move.
-
If you're working with large data sets, you may run into performance issues with the Load Data into Database Module. For large data sets, we recommend using a tool designed for data moves instead of the Module.
ModuleAttributes
The Load Data into Database Module helps you run tests with distributed data. This section explains the Module's attributes.
Source

You can connect to the source of your data via ODBC or JDBC.

ODBC connections have the following ModuleAttributes:
ModuleAttribute |
Description |
Optional |
---|---|---|
Connection |
Database connection that you want to use. Select a connection from the Value dropdown menu. |
|
SQL Statement |
SQL statement that you want to execute. You can use the SQL Editor to create, maintain, and run SQL statements in your TestCases. |

JDBC connections have the following ModuleAttributes:
Value |
Description |
Optional |
---|---|---|
Connection String |
JDBC connection string to access the database. For example: jdbc:sqlserver://1.2.3.4:49789;instanceName=SampleInstance;databaseName=TestDB;user=myUser;password=myPassword |
|
Class Name |
JDBC driver class name that you want to instantiate. Example: com.mysql.jdbc.Driver |
|
Driver Directory |
Directory of the JDBC driver. |
|
SQL Statement |
SQL statement that you want to execute. |
Target

You can connect to the target database via ODBC or JDBC.

ODBC connections have the following ModuleAttributes:
ModuleAttribute |
Description |
Optional |
---|---|---|
Connection |
Database connection that you want to use. Select a connection from the Value dropdown menu. |

JDBC connections have the following ModuleAttributes:
Value |
Description |
Optional |
---|---|---|
Connection String |
JDBC connection string to access the database. For example: jdbc:sqlserver://1.2.3.4:49789;instanceName=SampleInstance;databaseName=TestDB;user=myUser;password=myPassword |
|
Class Name |
JDBC driver class name that you want to instantiate. Example: com.mysql.jdbc.Driver |
|
Driver Directory |
Directory of the JDBC driver. |
|
The Target section has additional, general ModuleAttributes for target tables:
ModuleAttribute |
Description |
Optional |
---|---|---|
Table Name |
Name of the table into which Tosca DI loads the data. You can use the SQL Editor to verify whether Tosca DI created the new table and added the data. |
|
Create Table Statement |
To create a new table during the data load, enter a statement that specifies how to create the target table. |
X |

The Load Behavior section has the following ModuleAttributes:
ModuleAttribute |
Description |
Optional |
---|---|---|
Keep Existing Table Entries |
To add the data to an existing table, enter True. If you don't, Tosca DI drops the table before loading new data. |
X |
Number of rows per transaction |
Maximum number of rows that Tosca DI loads at a time. The default value is 1000. |
X |
Example
In this example, you use the Load Data into Database Module to load data from an ODBC connection into a new table in the caching database.
Use Load Data into Database Module