Alteryx Designer Desktop Discussions

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

Running a SQL query obtained via user input

OS85
5 - Atom

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 !

3 REPLIES 3
JohnJPS
15 - Aurora

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

SeanAdams
17 - Castor
17 - Castor

:-) 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.

 

 

OS85
5 - Atom

@JohnJPS and @SeanAdams,

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

Labels