Sometimes one wants to ensure that certain columns exist in a set of Integrator tasks. A common practice is to create a secondary flow that is guaranteed to have the columns and concat that to the main flow. For example:
Here the secondary flow from the List input object exists to ensure the columns exist.
This List object could be defined by explicitly adding the required columns as follows:
However, instead of defining the columns explicitly in the object (requiring editing of all scripts when a change occurs), the column list can be defined in an array parameter file and used to dynamically create the required columns. For example, assume that columns.txt contains a list of columns that must be in the flow, and an array parameter called columnlist has been created using this file.
Instead of explicitly defining the required columns in the List object, insert the array parameter as the column name. For example:
When the script is executed, all values of the array parameter columnlist will be created as columns.