Creation or Deletion Step

Introduction

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.

Properties

Property nameDescriptionValuesDefault valueMandatory
databaseThe identifier corresponds to database configuration stepStringNoneYes
input.folderThe folder containing SQL filesStringNoneYes
enableWhether the step is enabledtrue/falsetrueNo
encodingEncoding to considerer when reading filesStringValue of property defined in global stepNo
multithreadNumber of threads to use for parallel stepsIntegerValue of property defined in global stepNo
plainExecutionWhether to consider the total sql file instead of parts separated by ";"true/falsefalseNo

Examples

Deletion step

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:

  • SQL scripts for dropping tables are stored in the database/tables-drop directory
  • The operation utilizes a PostgreSQL connection identified by cnxPostgreSQL. This identifier corresponds to a specific database configuration step defined elsewhere in the INI file
  • The process will use 5 threads for execution.

Creation step

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:

  • SQL scripts for creating tables are stored in the database/tables-create directory
  • The operation utilizes a PostgreSQL connection identified by cnxPostgreSQL. This identifier corresponds to a specific database configuration step defined elsewhere in the INI file
  • The process will use 5 threads for execution.