Workbench ODBC - Dynamic query/parameter
When we are establishing a new job in Domo Workbench of the type ODBC, we write the query in the box of Database Query Editor as in the image below.
However the query we want to do should not be static and we would like to modify that query based on external triggers.
For example, in the image, is it possible to pass a value to #FIELD# from a txt or csv file? Or to execute a sql file directly?
Thanks
Answers
-
Hi @Fatias
Currently workbench doesn't support this sort of querying. The only thing it supports right now is a lastvalue (or previewonly) type parameters which will track the value in the last row of your dataset from your previous run and allow you to insert that into your query.
For more information refer to step 19 on https://domohelp.domo.com/hc/en-us/articles/360042932734-Connecting-to-ODBC-Data-in-Workbench-5
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
You don't have to write standard SELECT statements in the query window. You can execute stored procedures in the query window, which seems like what you might want to construct to allow for the dynamic nature that you are looking for. You can also write queries against views in case that would work for you.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
You can also use the Lookup Table feature under Transformations to join and then filter the information.
https://domohelp.domo.com/hc/en-us/articles/360043437193-Combining-DataSets-in-Workbench-5
You might also consider doing this work in Domo in Magic ETL. It would reduce the workload on your system and you can leverage the speed and power of the Domo ETL tools.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
@MarkSnodgrass thanks for your feedback, it is good to know that we can use stored procedures in the query window.
However, in this case the value that I want to pass to the dynamic variable comes from an external source and that's why I was wondering if it would be possible to read (select) that value from a csv file to the dynamic variable or if it is possible to build the query in a sql file and run it in the query window.
Of course, one possibility would be to store that value in a temporary table in the database and then the query would be more simpler because would be only the join of two tables but I would rather avoid this workaround.
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 710 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive