Load Data into Database Module

The Load Data into Database Module loads a data set from a source database into a target database. As source and target you can use the database connections that you defined in the Tosca BI Connection Manager.

With the Load Data into Database Module, you can perform multi-source comparisons. This can be useful, for instance, if your data is spread across different database systems and you want to bring all data to the same system.

The Load Data into Database Module can also be a preparatory step for Row by Row Comparison TestCases. When you run the Row by Row Comparison TestCase, the target into which you load your data sets becomes the source of your data, and you can compare it to another target.

Tricentis provides this Module to help the testing team run certain tests with distributed data. For a testing tool, it's not best practice to move data around. Also, this Module doesn't perform well with large data sets. Tricentis recommends to use a tool designed for data moves and not rely on this Module for that purpose.

Use the Load Data into Database Module

You can find the Load Data into Database Module in the Tosca BI Modules And Samples.tsu subset.

It contains the following ModuleAttributes:

ModuleAttribute

Description

Optional

Connection

Specify which Database connection you want to use.

To do so, click into the Value field and select a connection from the drop-down menu.

 

SQL Statement

Enter the SQL statement that you want to execute.

The SQL Editor lets you create, maintain, and run SQL statements in your TestCases.

 

Table Name

Specify the name of the table into which Tosca BI loads the data.

You can use the SQL Editor to check whether Tosca BI created the new table and the data it contains.

 

Create Table Statement

Enter a statement that specifies how to create the target table.

X

Load Behavior - Keep Existing Table Entries

Set to True to add the data of the text file to the existing table. Otherwise, Tosca BI drops the table before loading new data.

X

Load Behavior -Number of rows per transaction

Specify the maximum number of rows you want Tosca BI to load at a time.

The default value is 1000.

X

In this example, you use the Load Data into Database Module to load data from an ODBC connection into the caching database.

To do so, you set the ModuleAttributes as follows:

  • You select the ODBC connection as source connection and the caching database as target connection.

  • You define the SQL statement that you want to execute.

  • You specify the name of the table into which Tosca BI loads the data.

  • You use a statement to specify how to create the new target table.

  • You specify the load behavior.

Use Load Data into Database Module