Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SQL Lab] Saved Queries do not include parameters #20576

Closed
3 tasks done
kamalkeshavani-aiinside opened this issue Jul 1, 2022 · 3 comments
Closed
3 tasks done

[SQL Lab] Saved Queries do not include parameters #20576

kamalkeshavani-aiinside opened this issue Jul 1, 2022 · 3 comments
Labels
#bug Bug report

Comments

@kamalkeshavani-aiinside
Copy link
Contributor

If a query with parameters is saved, the parameters are not stored with the query. So when executing a saved query, query fails without the necessary parameters.

How to reproduce the bug

  1. Create a query with parameters
  2. Run and save the query
  3. Go to Saved Queries, and run in SQL Lab

Expected results

Saved Query should have the parameters.

Actual results

Saved Query does not have parameters.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • browser type and version:
  • superset version: master
    Dockerhub image
  • any feature flags active: ENABLE_TEMPLATE_PROCESSING

Checklist

Make sure to follow these steps 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

In 'saved_query' table of metadata, there is column 'extra_json' which can/should be used to store the parameters.

@kamalkeshavani-aiinside kamalkeshavani-aiinside added the #bug Bug report label Jul 1, 2022
@nbalusu
Copy link

nbalusu commented Jul 21, 2022

I have the same issue in 1.5.1. I was able to set parameters, after I saved the query I am not able to see saved parameters.. The only work around I figured is to save the parameters in description. copy params from description every time I run. Can someone please let me know If I miss any config to save params. Thanks!

@kenho811
Copy link

kenho811 commented Oct 1, 2022

Same behaviour observed in Superset 2.0.0

I confirm that this same behaviour persists in 2.0.0.

image

When I close the tab with the saved SQL query (together with the parameters), and reopen that, the parameters are gone, and I need to copy and paste my parameters again.

I am not sure if it's meant to be like this, but It would be great that when the SQL template is saved in SQL Lab, the parameters are saved together as well.

@divick
Copy link

divick commented Apr 13, 2023

I still see this issue in v2.0.1. Looking at the merged PR I see that it was committed and then reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

4 participants