Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Find and Replace with Column Headers

mvtthewcornelison
7 - Meteor

Hi Alteryx Community,

 

This is my first post ever within community- I am hoping I am posting this in the correct place.

 

I have a excel file that has column names but I would like for the column names to be different than what it is currently based on a mapping file I have created. In summary, I want to basically have a find and replace but for rows (specifically column headers) instead of for columns. 

 

To further illustrate, below is an example of what the excel file currently has as a column header and here is what the mapping file puts it to (CURRENT NAME -> NEW NAME) :

 

Employee_ID -> Employee Number

First_Name -> Employee First Name

etc.

 

The way that I have my mapping file setup is two columns, one for the current name, and one for the desired new name. 

 

Any input will help greatly. Please let me know if you need any further information.

 

Thanks,

Matthew

 

 

4 REPLIES 4
jdunkerley79
ACE Emeritus
ACE Emeritus

Use a dynamic rename tool with configured to take the field names from the Right Input Rows

 

This allows you to supply a look up table and match on existing to new name.

BenMoss
ACE Emeritus
ACE Emeritus
Hi and welcome!

This is a great question and can be solved with one tool.

The dynamic rename tool can be used in this way.

Your main data stream should go into the top input anchor.

Your mapping table should go into the bottom anchor.

In the dynamic rename, your method should be 'take headers from right input rows'

Then you can select the old header and new header fields.

Hit run and magic!

Ben
mvtthewcornelison
7 - Meteor

Hi Ben,

 

Thank you so much for the expedient reply- much appreciated! 

 

Your instructions were so clear and it worked (: 

 

Sincerely,

Matthew

mvtthewcornelison
7 - Meteor

Thanks for your reply! 

Labels
Top Solution Authors