Creating columns during an iteration and append them to a dataset

I would like to iterate over an excel file containing a bunch of data quality rules (eg. if then else rules) as they can be expressed in easyMorph. Since there are many of them, I would be handy to iterate over the file and add a column for each control to my dataset.

Is there a way to iterate over the file and generate al the columns (eg. CONTROL_1 …CONTROL_70) and the the result which is 1 or 0 if the record fails to the dataset using the iterate action ?

I have played around with parameters but it seems that calculated parameters (which I need to express the control role) are not read into the iterate command. Also, I cannot find a way when adding a new column into easymorph to give it a name equal to a certain project parameters.

Is there a way around to achieve this currently ?

I'm not sure I understand the way the columns are supposed to be generated, but in general there is no standard way to pass expressions to EasyMorph for evaluation. Also column names can't be specified using parameters.

If this really needs to be done, I would use the fact that .morph files are essentially XML files. Which means that they can be transformed using the XSLT action in EasyMorph. The action transforms XML files into another XML file (or something else) using standard XSLT stylesheets. With the help of the stylesheets it is possible to add new expressions into .morphs, modify them, change action properties (such as column names), etc. So the logic would be:

  • Create a master project and iterate a subproject over a list of expressions.
  • In the subproject, modify a .morph file (template) with the XSLT action, inserting expressions using parameters into XSLT stylesheets.
  • Run the modified .morph file from the subproject using the Call (or Iterate) action.

However, learning XSLT is a non-trivial task with a very steep learning curve. So I do not recommend going this way unless it strictly necessary.