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

Query changes on Sql Lab do not reflect on Slices that use them #12323

Closed
stevensuting opened this issue Jan 7, 2021 · 1 comment
Closed

Comments

@stevensuting
Copy link

How to reproduce the bug

If a query on SQLlab is used to create a slice by:
Sql Lab -> Write Query -> Save -> Explore -> Create Slice -> Saved
Lets say the query used is: SELECT name from table;
And the slice is called Details_Chart
Work great to this point.

Now, if we want to modify the query to SELECT name, address from table;
Sql Lab -> Saved Queries -> Edit Query -> Update the Query -> Save (UPDATE)

If we go slice to Details_Chart it will only show name as available column and not name & address
However, If we access Edit Dataset via the Explore Slice editor, it shows the updated SQL query ie SELECT name, address from table;

Expected results

It would be great if the update to the Sql Lab query pushed down to entities that use it. Much like how the Legacy editor already does.

Alternatives

For now I use the following methods to solve this:
#1

  1. Go to Sources -> Tables -> Remove the SQL LAB VIEW Filter -> Hit refresh
  2. Navigate to the table you want to edit and click on edit record
  3. Update the SQL query under Detail -> SQL
  4. Then click on the Column tab and add new column
  5. Hit save.
  6. Navigate to the chart and you will find the column available.

#2

  1. Go to SQL Lab -> Saved queries -> Navigate to the query you want to edit -> Click on Pop tab link
  2. Make modifications to the SQL query -> Run the query
  3. Hit the Save button, then select the update option with an appropriate name.
  4. The click on Explore.
  5. Rebuild the chart

Environment

(please complete the following information):

  • superset version: 0.37 to 0.38
  • python version: 3.7

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [Y] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [Y] I have reproduced the issue with at least the latest released version of superset.
  • [Y] I have checked the issue tracker for the same issue and I haven't found one similar.
@stevensuting stevensuting added the #bug Bug report label Jan 7, 2021
@junlincc junlincc added sqllab:editor and removed #bug Bug report labels Jan 7, 2021
@rusackas
Copy link
Member

Closing this since the issue is on an unsupported version of Superset. If this issue still exists in supported versions (1.5.x, 2.0.x) then please let me know! We can either re-open this issue or open a new one. Thank you for the report nonetheless!

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

No branches or pull requests

3 participants