Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Reading in all the files from one folder and joining them together

BillyL14
8 - Asteroid

Hi

I have a folder that contains a few different files all in the same format. They have to be saved separately as they come from the same source but slightly different parameters.  I have never used the folder browse interface tool but am wondering whether it could be useful here.

 

If I had say 3 of these files saved at the same location, would it be possible to pull them into the workflow, do some small operations in them and then union them together?

 

Thanks

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @BillyL14 

 

If you are saying do some small operations in them and then union them together. It's better to use 3 separate input tools.

 

But if you are ok with reading them all together and unioning them you can refer to this blog https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t...

 

Hope this helps : )


Happy new year to you and your close ones : ) May it be filled with happiness and prosperity =D

BillyL14
8 - Asteroid

hi @atcodedog05  and happy new year to you too!

 

My problem is that sometimes there might be 4 instead of 3 files every month. It is because I run the same report based on six different variants and sometimes there is or isn't data for some of the parameters.

 

I was going to go with 3 input tools originally but wanted to build in the capability to deal different number of files. Not sure if Alteryx can do that. 

 

thanks

Qiu
20 - Arcturus
20 - Arcturus

@BillyL14 
I believe you are looking for a classic importing multiple sheets from different Excel files with different schema issue.

I believe @mceleavey has provided a perfect solution for it.
I am sorry but I can not find the original post, but here is from my personal collection.

 

atcodedog05
22 - Nova
22 - Nova

Hi @BillyL14 

 

Methods in this blog should work provided you have the same column names and sheet names.

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t...

 

You can use Input/Dynamic Input tools option Output Filename as a field that can be used for differentiating data.

atcodedog05_0-1641045296100.png

 

If they are varying you can use the solution provided by @Qiu. If you are using a lower version of Alteryx and not able to open the workflow use this guide to downgrade your workflow https://community.alteryx.com/t5/Engine-Works/Making-Workflows-Apps-amp-Macros-Backwards-Compatible/...

 

 

Hope this helps : )

BillyL14
8 - Asteroid

Hi @atcodedog05 @Qiu 

Thank you for your help.

 

I have used an input tool with a * sign to import all the files from the location. As far as I can see, all the files have the same layout and come from the same place. However when I imported them, one was rejected for having a different schema although I can't figure how it was different. What other things does Alteryx look out for in regard to schemas being different apart from layout and file type?

arshuhansda
5 - Atom

Hey
If Alteryx is saying that the files have different schema, you need to check the Data Types of the particular file with the "Select" tool to see how Alteryx is interpreting the data type of each column. Mostly that is the reason, even if the columns are same in the file, but Alteryx sees them as different schema as the data type of those columns are different.

Labels