Alteryx Designer Desktop Discussions

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

Keep File name when merging multiple files with dynamic input

Hfares
5 - Atom

Hi all, 

 

I'm new to Alteryx so I'm struggling a bit. I'm trying to write a workflow that pulls xlsx files that have the same column structure from a directory and merge them into one .yxdb at the end. I've found on this community that it was possible to do this using the Directory tool and Dynamic input one. My issue is the following :

I'm trying to keep in a new column the corresponding file name for the different tables. If I had to schematize this it would look like this : 

 

file1.xlsx

entityscore
A3
B

4

 

file2.xlsx

entityscore
C5

 

Output :

entityscorefile name
A3file1.xlsx
B4file1.xlsx
C5file2.xlsx

 

How would I manage to do that ? 

Thanks !

Habib Fares

2 REPLIES 2
messi007
15 - Aurora
15 - Aurora

@Hfares,

 

Please see below how you can do this:

 

messi007_0-1616176478682.png

2 in the macro select the add file name

 

messi007_1-1616176526226.png

 

Attached the workflow,

 

If this solve the need please mark it as solved. It will help others

 

Regards,

jamielaird
14 - Magnetar

Hi @Hfares ,

 

You can adjust the setting below to output the filename as a field:

 

jamielaird_0-1616176689497.png

 

Labels