Alteryx Designer Desktop Discussions

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

Excel File Column Misalignment

sindhu44
5 - Atom

Hello, I have few files that I receive from external vendor and there is a common scenario where columns are sometimes misaligned meaning not in the same order as the template provided. Is there a way in Alteryx to overcome this issue to somehow find the column names in order and insert into SQL table.

 

Attached is the workflow with how the order of columns can change, 1st input is the expected format that needs to be in, 2nd input is the format that is actually received. 

5 REPLIES 5
alexnajm
16 - Nebula
16 - Nebula

Seems like you could put a Select tool at the end and set the correct column order!

cjaneczko
13 - Pulsar

Can you use a Union tool? If the column names are the same it doesnt matter what the order is. You can create a template using the first file and union in the second file. 

 

image.png

sindhu44
5 - Atom

cjaneczko, your solution would work, but I am also trying to  handle column renames by using Dynamic Input option which would require my column names in be in same order.

So, this is where it gets tricky to handle column renames, column misalignment at the same time. Any thoughts on how to handle both issues at once.

AndrewDMerrill
13 - Pulsar

This sounds like a job for the ever noble, usually dependable, Batch Macro. Just go into the interface settings and set to "Auto Configure by Name":

Batch Macro Settings.png

The batch would be each file running individually.

cjaneczko
13 - Pulsar

Why not use the union first then rename the columns later on in the workflow?

Labels