Scripted Input Queries

Use cases :

  • Full database replication
  • Multi-files to database copy
  • Merge data from multiple tables to a single one

1.1. Full database replication

That’s all.

If you want to show the Source Data (accessible with “F5” or from the contextual menu), you’ll see that multiple tables will be processed. You can individually show data from all of them.

1.2. Partial database replication

Any table beginning with “sample” will be processed.
The output “*” symbol means that the output name will match the input one.

Again, if you want to show the Source Data (accessible with “F5” or from the contextual menu), you’ll see that multiple tables will be processed. You can individually show data from all of them.

The contextual menu is informing you that you are using scripted patterns.
The “Load Source data” menu allows you to load data from any of the matching tables.

The Job will process all the corresponding tables in a single query :

1.3 Scripting the table output

As seen above, using the “*” output means that the target table will match the source table name. You can script that output as well :

An advanced output script

Every output table name will start with “prefix_” and end with the input table name :

The LOG viewer shows you how the input tables have been copied in the Target.

…keep in mind that you can write dynamic output script by using the Dynamic Parameters.

1.3. Merging Data from multiple tables

If you want all the input tables to be merged in a single one, you just have to specify an output table name like this :

All of the data retrieved from multiple input tables will be merged in a single table.
The LOG viewer shows you how the merging process performed.

1.4. Multi-file input query

You can do pretty much the same with files. It’s inspired by the famous C:\>DIR *.* shell command !

Will retrieve all files from the selected connection (local, network path or (s)ftp server)
Will retrieve all CSV files from the selected connection (local, network path or (s)ftp server)
Will retrieve files starting with “sample” and with the “CSV” extension from the selected connection (local, network path or (s)ftp server)
As shown before, the “Load Source Data” menu allows you to load each individual file.

en_USEnglish