Alteryx Designer Desktop Discussions

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

Import Disparate Files from a Directory and Union them Based on Column Position

mmunozjr
7 - Meteor

Hello,

 

I am in need of creating a workflow that would be able to go to a file folder or directory and import all of the different file types (primarily Excel files and CSVs). Once imported, I need to be able to join all of these files into a single file. These files have the same content, however, the column names differ in nomenclature and position. I would need to be able to map them correctly based on position before creating a union file.

 

Your assistance is greatly appreciated!

 

Thank you!

I have attached four small sample data files for this exercise.

5 REPLIES 5
Yoshiro_Fujimori
15 - Aurora

Hi @mmunozjr ,

 

I assume you want to keep the name and position of the first file.

Workflow

1267328.png

You need to cleanse each file to be aligned with the first file.

The column name and data type should be aligned, but you do not need to change the column positions, as Union Tool will do the work.

 

I hope it helps. Good luck.

Qiu
20 - Arcturus
20 - Arcturus

@mmunozjr 
If we want to be dynamic, I think we better use this macro.

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Import-Multiple-sheets-in-from...

And since your Field Names and positions can be different, some manual adjust would be inevitable I think.

0430-mmunozjr.png

 

mmunozjr
7 - Meteor

Thank you, Ace Qiu for your time and effort in assisting me with this solution.

 

I greatly appreciate it.

 

Regards,

Manuel

mmunozjr
7 - Meteor

Thank you, Yoshiro for your time and effort in providing this solution. 

 

I greatly appreciate it!

 

Regards,

Manuel

Qiu
20 - Arcturus
20 - Arcturus

@mmunozjr 
Thank you for the feedback and hope it helps.

Labels