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.
Solved! Go to Solution.
Seems like you could put a Select tool at the end and set the correct column order!
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.
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.
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":
The batch would be each file running individually.
Why not use the union first then rename the columns later on in the workflow?
User | Count |
---|---|
18 | |
14 | |
10 | |
6 | |
6 |