Mark Kromer
Thanks for your reply. I am attempting to process column names dynamically to create the row hash based upon its values, but the issue I am experiencing is how to obtain the values for the sorted column names.
The documentation for the byNames function states 'Computed inputs are not supported but you can use parameter substitutions'. This explains why in your example that a parameter was used as input the split function to create the array used in the byNames function:
sha2(256,byNames(split($cols,',')))
I can use this technique, but I would like to understand the reason why this following method would not work.
Data flow does provide convenient functions to get the column names from the input file and sort them. I created a derived column called sortColumnNames and configure it as follows:
sort(columnNames(), compare(#item1, #item2))
In the next or same derived column step, I configured a checksum column to obtain the hash for the row data based upon the sorted names array:
md5(toString(byNames(sortColumnNames)))
This seems simple to do within data flow without having to create a external parameter for the data flow. However, during the debug session for the data flow, this error message is returned:
DF-EXPR-030 - Column name function 'byNames' does not accept column or argument parameters
Can you help explain why the byNames function is limited or prohibited from using this type of parameter?