Free Trial

Alteryx Designer Desktop Discussions

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

Build an Analytics App to take file input to run SQL query

NewTableauBie
6 - Meteoroid

My client is looking for an interactive functionality to input a list of ID to pull the data once giving they can't run SQL query. 

 

The file input contains a list of ID to pull information about, where users can change as needed.   

 

1) I could convert file input to a text input, and join with the database query. Rrunning into two issues: 

     a. it takes very long time to join text input and full database query.

     b. the flow I created is not pumping the same input from .txt file to output. I can't see anything in output.  (attached here).  

 

What did I miss? 

 

Ideally,  I would like to use dynamic input tool to modify SQL queries,  but when replacing specific string,  can it be replaced with a list of ID?  how to make this happen?   

 

select * from database. table

where dw_acct_id = '62323327'. 

 

Thank you in advance for any help. 

 

 

 

2 REPLIES 2
jamielaird
14 - Magnetar

Hi @NewTableauBie ,

 

Regarding this part of your query:

 

I would like to use dynamic input tool to modify SQL queries, but when replacing specific string, can it be replaced with a list of ID?

To use a list of IDs in your WHERE clause you will need to use an IN statement, e.g.

 

WHERE ID IN (1,2,3,4,5)

 

You can a WHERE clause with a list of values using the Dynamic Input Tool, and this is well documented on the forum:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modifying-SQL-Query-using-the-Dynamic-...

NewTableauBie
6 - Meteoroid

Thank you  @jamielarid.

 

 

 

 

 

 

Labels
Top Solution Authors