Hi, my colleague built a SQL but it requires parameters. How can I do that in Alteryx? I assume I would need an input file and somehow "join" them? For example, I have a sales table but I only need it to populate for a specific month and specific year. Thank you for your help.
Solved! Go to Solution.
@AgnesL yes you would need an input data tool and in the config you will want to go to data sources and select the appropriate driver OleDB or ODBC and from there once you authenticate and connect you can click on the table SQL Editor and write a SQL query to meet your needs/feed in parameters
The main question would be, where are those parameters coming from?
If they are from a user, you'd use the Interface tools to connect into your Input Data tool and have the Action tool between them update the placeholder value in the query
If they are from another file, you'd read in that file and use a Dynamic Input after to Modify the SQL query based on the values from your input
I ran into a problem, how do I do multiple clauses in one?
I want to run for Jan 2024, Feb 2023, and Mar 2022 but the window only allows one clause per the drop-down menu. Thank you for your help.
@AgnesL The set up that I see here would run three queries because it has the three rows of parameters, and would run the way that it seems like you want.
User | Count |
---|---|
52 | |
27 | |
25 | |
24 | |
21 |