Scripted Output Files

Use cases :

  • Define fully customized output filenames

In some cases, you may need to script output files, for exemple, when those files are intended to be retrieved by a robot that needs special filenames (this is the case with some Treasury or Accounting softwares)

That’s why I added an advanced scripting feature.

Let’s start with an exemple. I’ll retrieve data from an SQL table containing 100 rows. I want the output files to split on each 10 rows, as selected below :

The CSV target settings.
The settings panel is not the same if choosing an XML, JSON or EXCEL target.

Now, I’ll use one of the available keywords :

[FILECOUNT] is one of the available keywords

Supported keywords :

  • [FILECOUNT]
  • [ROWCOUNT]
  • [QUERYALIAS]
  • [anyInputFieldName]

The produced files, as shown in the Windows explorer :

The output files, with replaced keyword. Each file contains 10 rows.

Now, I’ll add the [ROWCOUNT] keyword :

…and the produced files, as shown in the Windows explorer :

The output files, with replaced keywords. Each file contains 10 rows.

Then, I’ll add the [anyInputFieldName] keyword, by using two of the available fields in Source data :

…and the produced files, as shown in the Windows explorer :

The output files, with replaced keyword. For each new file, the value from “id_sample” and “li_sample” have been used in the filename.

And finally, I can combine those keywords with Dynamic Parameters :

A dynamic parameter has been set.
The query, with the inserted dynamic parameter.

…and the produced files, as shown in the Windows explorer :

en_USEnglish