Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic Rename Column based on Master excel

VJ_88
8 - Asteroid
  • I have a excel with data where columns names are not consistent and since columns can be added or removed  every week ,
  • we needed a solution wherein columns could be dynamically renamed basis master list
  • On research we found Dynamic Rename could do what we needed
  • But since main data excel and first rows as F1, F2.... and actual headers are in row 2 as in screenshot
  • Dynamic rename with Take input from Right input is not working for me screenshot 2 
  • Screenshot 1 has main excel where columns name are in-correct
  • Screenshot 2 has Master excel
  • Screenshot 3 has Dynamic rename 
  • So, column F1 (4th column) and latter should be renamed from master excel but it maps from 1st column
  • If  a solution is possible kindly share screenshot as we cannot download Alteryx file on office system as external download are disabled and Alteryx is installed on office system
  • Screenshot 1 Source file columns name incorrectScreenshot 1 Source file columns name incorrectScreenshot 2 Master name excelScreenshot 2 Master name excelScreenshot 3 dynamic rename outputScreenshot 3 dynamic rename output
1 REPLY 1
KGT
13 - Pulsar

So, do you want the headers to always be Date; Name; Record_Type; Header; Test; State; Person_Name?

 

If so, then try and rename all fields, by listing all seven fields in the master. (I assume you're using "Take Field Names from Right Input Metadata")

 

The other option is that if you know these 4 fields are going to come through without names on new files, then you can use the master as a lookup to replace F1; F2.... using "Take Field Names from Right Input Rows". The lookup would be 2 columns.

If the field names could be different, but always from spot 4, then do this and play around if it doesn't quite work first go.

  • Field Info on new file
  • Sample to skip first 3 rows. (This could also be recordID + Filter, or just filter on Date/Name/Record_Type).
  • Join with the option "Join by record Position"

You now have your lookup table to rename from.

Labels
Top Solution Authors