Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Is there a way to define field names when the input has no header row?

Dom
8 - Asteroid

Is my only option to use the Select tool and rename all columns?

5 REPLIES 5
JohnJPS
15 - Aurora

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.

Dom
8 - Asteroid

It seems the best option would be to use the select tool. Thank you, John.

JoeM
Alteryx Alumni (Retired)

@Dom

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.

TaraM
Alteryx Alumni (Retired)

@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.

Tara McCoy
s_pichaipillai
12 - Quasar

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

DyRcsv.PNG

 

 

Define a mapping for each unknown fields with correct COlumn Names as below using Text Input. 

 

Mapp.PNG

 

That's it, now using Dynamic Rename tool its very easy to map these column names for each fields

 

DyRconf.PNG

attaching the demo workflow

Thanks

Saravanan

Labels