question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jinja url_param in Sql_lab sql query not working

See original GitHub issue

Unable to run query after passing url_param parameters to sql_lab query. Button does not do anything.

image

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?

image

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

  1. Pass the table parameters in the url and sql query with url_param
  2. All database,schema and table fields are supposed to be empty.
  3. Click “Run query” button.
  4. 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
villebrocommented, Jan 15, 2020

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.

2reactions
villebrocommented, Jan 14, 2020

There was a fix related to url_params that was included in 0.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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found