jinja url_param in Sql_lab sql query not working
See original GitHub issueUnable to run query after passing url_param parameters to sql_lab query. Button does not do anything.
This functionality used to run in 0.28 version, however after upgrading to 0.35 it not running anymore.
Are these fields supposed to be pre-filled using url_param?
Can some one please help with this, if possible please post some examples on how to pass url_param in newer version.
A clear and concise description of what the bug is.
Expected results
what you expected to happen.
Actual results
what actually happens.
Screenshots
If applicable, add screenshots to help explain your problem.
How to reproduce the bug
- Pass the table parameters in the url and sql query with url_param
- All database,schema and table fields are supposed to be empty.
- Click “Run query” button.
- Nothing happens.
Environment
(please complete the following information):
- superset version:
0.35.1
- python version:
3.6
- node.js version:
node -v
- npm version:
npm -v
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
jinja url_param in Sql_lab sql query not working #8962
Unable to run query after passing url_param parameters to sql_lab query. Button does not do anything. This functionality used to run in 0.28 ......
Read more >SQL Templating - Apache Superset
SQL Templating. Jinja Templates. SQL Lab and Explore supports Jinja templating in queries. ... SELECT * FROM tbl. WHERE ( {% if from_dttm...
Read more >Parametrizing Queries Using Jinja
Dynamically modify specific elements of your SQL query (such as calculations, aggregations, etc) based on dashboard filter conditions.
Read more >SQL Lab — Superset's documentation documentation
A search engine to find queries executed in the past; Supports templating using the Jinja templating language which allows for using macros in...
Read more >SQLAlchemy query results not passing to jinja template as ...
There are plenty which sound similar to my issue but the resolutions don't work for me. I've created three models in SQLAlchemy -...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This does appear to be a regression, not sure when it was introduced. I need to think about how to resolve this, as there are many potential solutions. Also, the
url_params
feature needs to be more thoroughly unit tested and documented going forward.There was a fix related to
url_params
that was included in0.35.1
, see #8536 . However, that particular PR focused on all other areas of Superset except SqlLab. I can look into this in the coming days.