Source as a column when using Cat
Hello,
I recall that there is a way that, when you concatenate multiple nodes, you can add a column identifying the source of each record. So, in my example... I imported 3 Excel files and now, I'd like to concatenate them but not lose the file name because the source is important. How do I do that?
Thanks,
Rodi
-
Hi Rodi,
You need to configure the Excel File nodes to output the file name. This can be achieved by including the generatedFields directive in the WorkBookSpec property of the nodes.
For instance, assuming the defaults are used for all other directives (i.e. you have not populated anything in the current WorkBookSpec properties - meaning the data from the first sheet will be read starting at cell A1), you can insert the following in the WorkBookSpec properties:
<workbook>
<generatedFields>
<field type="filename" />
</generatedFields>
</workbook>If you have already populated the property, add the generatedFields directive to it.
Regards,
Adrian
Please sign in to leave a comment.
Comments
1 comment