Alteryx Designer Desktop Discussions

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

Input data from another workflow into a macro

Jesusivt
5 - Atom

Hi all! 

 

I'm trying to input a database to a macro that contains different filters, but I don't know how to do that. 

This is what my main workflow looks:

Jesusivt_3-1587594791198.png

 

The first macro in the canvas opens all files from a selected directory and add them up into a database. The second macro looks like this:

Jesusivt_2-1587594575911.png

What I'm trying to do is that, the database from the first macro inputs into this macro workflow to pass all the filters and outputs the filtered database.

 

 

Thanks!

 

 

5 REPLIES 5
ggruccio
ACE Emeritus
ACE Emeritus

Hi @Jesusivt,

 

You will need to find a way to pass the metadata from macro 1 to macro 2. 

 

Typically what I would do would be to save the output from macro 1 in a .yxdb.  It only has to be one row of data if you are concerned about space.

 

Then use the Macro Input tool in macro 2 to map to that file (see below).  Macro 2 just needs to know the expected format of the data it is receiving from Macro 1 (the field names, the data types etc.)  As long as this doesn't change every time you are good to go.

 

ggruccio_0-1587648033620.png

 

Jesusivt
5 - Atom

Thank you! This helped me to resolve the problem! But now the second macro output is duplicating the info and I'm not really sure why this is happening. Hope you can help me!

 

Thanks again!

ggruccio
ACE Emeritus
ACE Emeritus

Hi @Jesusivt 

 

It is possible that the Join tool at the end is the culprit....maybe need additional fields to join on to prevent duplication etc.

 

One way to test would be to bring all the data into the macro...or create a workflow version of the macro to run.

 

Also since you are filtering off the data into two streams that you bring back into one you may want to Union instead of Join?  

 

 

Jesusivt
5 - Atom

I used the union app and no longer had duplicated info. You are a lifesaver! Thank you!

ggruccio
ACE Emeritus
ACE Emeritus

Glad to have helped!

Labels