Free Trial

Alteryx Designer Desktop Discussions

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

Batch Macro to Load SAS Datasets of different schemas

madhavis
5 - Atom

Hello, 

 

I have 50+ SAS files of different schemas that I need to load and analyze. I created a batch macro to read all the files together and it reads fine (didn't analyze the data completely yet) but all the records are populated with the first filename of the 50 files instead of the file a particular record came from. It is especially important for me to get the filename of all these files for data processing downstream. Please suggest where I am going wrong in the process. 

 

Thank you!

3 REPLIES 3
SPetrie
13 - Pulsar

What settings do you have for your action tool and input tool inside the batch macro?

 

madhavis
5 - Atom

madhavis_0-1651698778379.png

madhavis_1-1651698803678.png

 

With these settings I got it to work, meaning summarize the  record counts by each filename. 

 

madhavis_2-1651698878627.png

 

All these files have very different fields in each. Is there a way to tell which fields came from a particular file? 

 

Or, can I get a list of fields from each of these 50+ files without creating 50 input data tools? 

 

Appreciate all your help. 

 

Thank you, 

Madhavi

SPetrie
13 - Pulsar

Ok, I see the issue.

Your action tool is updating the location of the macro input, but not the name. Thats why they all have the same name.

SPetrie_1-1651699296311.png

 

You want your action tool to look like this, where you are updating the entire input data and not just the location of the file you are opening.

SPetrie_2-1651699452075.png

 

 

As far as the fields go, the Field Info tool is what you want. It will list the source for all the fields.

Labels
Top Solution Authors