Incubator-superset: jinja url_param in Sql_lab sql query not working

Created on 14 Jan 2020  路  5Comments  路  Source: apache/incubator-superset

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!

  • [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x] I have reproduced the issue with at least the latest released version of superset.
  • [x] 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.

#bug inactive

Most helpful comment

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.

All 5 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

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.

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

@villebro I try to do exactly (I think...) of what it's shown in the PR and it does not work. url_params in the dashboard are not being passed to the chart and then to the datasource sql.
I'm on 0.35.2

EDIT: @villebro please ignore .. I after saw the PR was applied after 0.35.2 .. thanks!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eliab picture eliab  路  3Comments

kalimuthu123 picture kalimuthu123  路  3Comments

XiaodiKong picture XiaodiKong  路  3Comments

tmccartan picture tmccartan  路  3Comments

gbrian picture gbrian  路  3Comments