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.
Connection | Query |
xyz | SELECT * from `Table` LIMIT 7222 OFFSET 0 |
xyz | SELECT * from `Table` LIMIT 7222 OFFSET 7222 |
xyz | SELECT * from `Table` LIMIT 7222 OFFSET 14444 |
xyz | SELECT * from `Table` LIMIT 7222 OFFSET 21666 |
xyz | SELECT * from `Table` LIMIT 7222 OFFSET 28888 |
xyz | SELECT * from `Table` LIMIT 7222 OFFSET 36110 |
Solved! Go to Solution.
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.