The Data Migrator includes a creation or deletion step that executes SQL script on target database. This step can be added before or after data loading step.
This step does not create or delete entire databases. Instead, it's used to modify the existing database structure, such as deleting or creation tables.
Property name | Description | Values | Default value | Mandatory |
database | The identifier corresponds to database configuration step | String | None | Yes |
input.folder | The folder containing SQL files | String | None | Yes |
enable | Whether the step is enabled | true/false | true | No |
encoding | Encoding to considerer when reading files | String | Value of property defined in global step | No |
multithread | Number of threads to use for parallel steps | Integer | Value of property defined in global step | No |
plainExecution | Whether to consider the total sql file instead of parts separated by ";" | true/false | false | No |
The following configuration illustrates how to configure Data Migrator to drop tables using SQL scripts
[ExecuteSql - Drop tables] input.folder=database/tables-drop database=cnxPostgreSQL multithread=5
This configuration section specifies:
database/tables-drop
directorycnxPostgreSQL
. This identifier corresponds to a specific database configuration step defined elsewhere in the INI file5
threads for execution.The following configuration illustrates how to set up Data Migrator to create tables using SQL scripts
[ExecuteSql - Create tables] input.folder=database/tables-create database=cnxPostgreSQL multithread=5
This configuration section specifies:
database/tables-create
directorycnxPostgreSQL
. This identifier corresponds to a specific database configuration step defined elsewhere in the INI file5
threads for execution.