Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Discover peer insights or crowdsource your one of a kind Designer question.

Running a SQL query obtained via user input


I am new to Alteryx and wanted to understand if there was some way of using a query (obtained as a user input) to pull data from a database using an ODBC connection. We can get the user to either upload a .txt file containing the entire query or have them paste the query as a text input.

The closest solution that I could think of was using a R tool (with the RODBC package) to achieve this. Is there any other way of accomplishing this ? 

Thanks !


Hi @OS85

If it's always the same database (same ODBC or whatever), then unless I'm missing something, I think Dynamic Input would work great: just use the "replace a specific string" option, and replace an entire dummy query with whatever the user supplies.

Hope that helps.



:-) John, you beat me to it.


@OS85 - I've mocked this up for you below - as John says, the simple way to do this is to set up your dynamic input in a way that you have a good query response, and then do a string replace.




@JohnJPS and @SeanAdams,

Thank you both for your prompt replies ! The Dynamic Input tool works great !!