Is my only option to use the Select tool and rename all columns?
Solved! Go to Solution.
I was going to suggest that (using select tool) as the approach to take. Were you thinking of something else, like reading names from one file and values from another?
You could always feed your data into the R tool and supply columns there.... e.g.
names(df) <- customListOfColumnNames
... where df is your data frame, and customListOfColumnNames is a vector you've custom-created in whatever fashion you prefer.
It seems the best option would be to use the select tool. Thank you, John.
Check out the Dynamic Rename tool as another way to name fields programmatically.
It will allow you to:
1) Create names based on a formula
2) Take names from another dataset
3) Inherit names from somewhere within the dataset, etc.
@JoeM is correct - the Dynamic Rename tool is a great way to name fields programatically. You can also configure it to take the first row as field names, which is really useful if you are reading in text files that have the field names a couple of rows down.
Dom,
here is a working Demo using Dynamic Rename in case you need it
in this example, we have a customer CSV file with ONLY rows and no Headers
Define a mapping for each unknown fields with correct COlumn Names as below using Text Input.
That's it, now using Dynamic Rename tool its very easy to map these column names for each fields
attaching the demo workflow
Thanks
Saravanan