We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Iterative/Batch Macro - Dynamic Input In-DB

JessL24301
5 - Atom

Hi,

 

I am having issues with getting macros to work, if anyone can help please!

 

I essentially need to be able to run the below table through a macro which puts each rows Query into the 'Dynamic Input In-DB' tool one by one, as the 'Dynamic Input In-DB' tool only works for one row of data. I then need the macro to append the data that each rows query outputs from the 'Dynamic Input In-DB' tool into one file. I haven't got a clue how to even start with this, so if you don't know how to solve the whole thing, but have any suggestions for one part of my problem (e.g. you know how to solve only the 'get the macro to single out one row per loop' part or know how to append each macro iterations output together into a file), please share! 

 

The below table is part of a workflow and is not saved as a file anywhere, so the Macro Input needs to be linked to workflow data, not a text/file input if possible please. I can output this into a file if needed, but would prefer not to. Also, just to note, the macro input and output data are not the same, with the input being the below table and the output being the dataset in the query, which I think is part of the reason I can't get the macros to work.

 

ConnectionQuery
xyzSELECT *
from `Table`
LIMIT 7222
OFFSET 0
xyzSELECT *
from `Table`
LIMIT 7222
OFFSET 7222
xyzSELECT *
from `Table`
LIMIT 7222
OFFSET 14444
xyzSELECT *
from `Table`
LIMIT 7222
OFFSET 21666
xyzSELECT *
from `Table`
LIMIT 7222
OFFSET 28888
xyzSELECT *
from `Table`
LIMIT 7222
OFFSET 36110
1 REPLY 1
apathetichell
20 - Arcturus

so... either you need one workflow which uses a summarize tool of to concatenate all of your queries and gets the UNION syntax down for your in-db union or...

 

you use an action tool from your control parameter to update your queries in a batch macro. you datastream out your query outputs after your dynamic input in-db. you attach a macro output after. you use interface designer to auto-configure by name. you feed your queries into the batch macro via the control parameter and it auto unions in the main workflow.

Labels
Top Solution Authors