How to Process Data of Undefinite Structure (How to Parametrize a Set of Columns)

Valid for version 11.0.0+.

Assume we want to prepare a table with a certain set of columns. The columns configuration (column name, data type and default value) is stored in some file.

The step-by-step guide on how to do it is below:

  1. Prepare a component which creates the required table -  data_processing.comp . In this component, a set of columns is mapped as a definedColumns parameter.
  2. Create a  template.plan  plan that calls this component and passes the definedColumns parameter to it.
  3. Create a prepare_parameters.comp  component that does the following:
    1. Reads the column structure definition from an input (in our case it is  defCols1.txt file, but it can also be a DB table or a response from some SOAP call) and transforms it into an XML fragment
    2. Reads the template.plan  and replaces the value of the definedColumns parameter with the XML fragment
    3. Saves the resulting plan as executable.plan .
  4. Create a definition of columns - defCols1.txt which we defined as an input file before (step 3a).
  5. Create  parameterize_and_execute.ewf  for consequent execution of prepare_parameters.comp and then executable.plan .

The whole project is available here: