Build an Analytics App to take file input to run SQL query
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you @jamielarid.
I tried your recommendations, and the dynamic input tool using 'IN' works now with text input and action button, where text input is comma separated. (e.g. 12345668,52672527)
I wanted to use "File browser" as the input, which can be an excel file that contains a list of ID. What setting shall I use on 'action button'? I tried all available options, but no luck.
