I have a CSV file that can contain duplicate column names, which are automatically sequenced when brought into the Query.
eg. CSV file has:
Key
Label
Label
Component
Component
Component
Loaded with column names:
Key
Label
Label_1
Label_2
Component
Component_3
Component_4
The sequence number can change whenever additional columns are added. For instance, if a fourthLabel column is on the file, the load will impact both Label and COmponent column names, e.g.
Key
Label
Label_1
Label_2
Label_3
Component
Component_4
Component_5
I figured out how to merge the columns in the query, but whenever additional columns are added I have to go into the Advanced Editor and add the new column and rename other columns.
I am wondering if there is a way to set up logic to loop thru the column names and include all columns with the same starting column name into one merged column.
So in the initial example:
Merged Labels would include Label, Label_1, Label_2
Merged Components would include Component, Component_3, Component_4
Then when a fourth Label column shows on the file,
Merged Labels would include Label, Label_1, Label_2, Label_3
Merged Components would include Component, Component_4, Component_5
Any ideas?
Thanks

Report
All responses (
Answers (