Alteryx Designer Desktop Discussions

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

Batch Macro for a dynamic input (update full path)

RomainDv
6 - Meteoroid

Dear Community, 

 

Im struggling a bit with the design of a batch macro;

 

I created a workflow that can process a certain type of reporting.

This reporting is an xlsx file, that exists for each country. All the reportings have the exact same structure and design (one file per country)

I have created the workflow to process the reporting for one single country. I have turned this workflow into a macro. 

 

I need the batch macro to perform a dynamic input, processing all the reporting of all countries and aggregating all the data in a single output.

 

In order to do so, I need the "control Parameter" tool to update the full path of the file that is used by the "Input data" tool of the main workflow. 

I get the following error  The node "Properties" is missing the child node "Configuration" that I do not understand.

 

Please see attached: 

- Macro - workflow One-stream P&L.yxmc : this is the main workflow that processes the reporting. I need to have the dynamic input, therefore I have applied a Control Parameter

- List of full path.Yxmc: this workflow edits the list of all the existing full path tha tI need to have applied in the "input file" of the first macro.

 

Many thanks for your help.

 

 

 

5 REPLIES 5
gautiergodard
13 - Pulsar

Hey @RomainDv 

Would this macro work for your use case?

You need to provide the macro a full path of your excel file (including sheet name) and the macro will automatically import all of the data.

Hope this helps! Please accept as solution if it provided an answer to your problem.

RomainDv
6 - Meteoroid

Hey @gautiergodard, 

Thanks for your reply.

However my issue is that I have 10 or more distinct excel files to import, not only one.

I know the Directory tool can provides me with the list of the files.

My issue is: how can I connect the result of the directory tool, to the Parameter control of the MAcro, so that the macro can extract the data from all the excel files ?

Thanks

JamesCharnley
13 - Pulsar

Hi @RomainDv,

 

If your reportings have the exact same structure and design as you said (ie identical schema) then you shouldn't need a batch macro at all. All you need is a list of full paths from your directory which you can feed into the dynamic input.

 

This article really helped me get my head around when you need to do what with inputs:

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

RomainDv
6 - Meteoroid

Dear @gautiergodard,

I managed to make it works thansk to your batch macro template, thanks a lot

 

Dear @Jamescharnley

Thanks for your comment. I had explored those solutions prior to using a batch macro, however my inputs do not allow such solution: the dynamic input aggregates all the inputs the one after the other, and in that way, my workflow does not work. I need to have each file processed across the workflow, and then aggregate the output afterwards, which is the reason why I had to use a batch macro.

 

Best regards

 

 

gautiergodard
13 - Pulsar

Hey @RomainDv,

Glad it worked! 

Please accept my prior post as a solution in order for others with a similar problem to find the solution more easily in the future!

 

Thank you! 

Labels
Top Solution Authors