I'm just starting to look at Alteryx and was not finding much yet, but my question is can Alteryx pull from a location a list of sql queries and execute to compile the results into single dataset?
Hi @amrm1619
Is the dataset located in a file or in a database?
If it's in a database, you can use the Dynamic Input In-DB Tool to pass a SQL query and a Connection String and execute the statement against a specific database.
Cheers,
Hello @amrm1619
This is totally possible with a batch macro.
Please find attached an workflow with the following suggestion:
Read the directory where the queries are located as .txt, then read all of them with dynamic input, after that send the query code to the batch macro, and it will replace for the statement of desired query.
Workflow:
Macro:
Remember that the batch macro will run 1 time for each row, and each row is a query.
You will need to update your credentials on Database.
Hope this helps,
Tanai
I have been trying to get this to work, but I don't see a macro control in my Alteryx just a control parameter. Am I missing something?
Hello @amrm1619
you don’t need the control parameter in this case as the batch macro will run for each row on your input.
The control there are the number of rows entering the macro.