In my work, I am getting input data in key value format, which means one column having all the column names and the other ones having corresponding column values. Basically its a transposed version of the data. So I am applying Crosstab tool to get the data back to normal form. But the problem I am facing is - column names are having brackets, commas in it. For example, its like KILOS/LITRES('000). So when I apply transpose, column names are changed to this KILOS_LITRES___000_ . How to retain them in the original format?.
I tried to use dynamic rename, but couldnt find a better logic to solve this as I have more than 40 columns in my data.
Something like this should do what you need. Not pretty, but gets the job done
So the summarise and RecordId tool create a lookup for each of your header fields names: 00001, 00002 etc... The join tool replaces your original header field names with the new ones. Which then go thorugh the cross tab without being changed. Then the dynamic rename tool is in "Take field names from Right Input rows" mode which puts your original fieldnames back.