You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/07 07:34:09 UTC

[GitHub] [superset] stevensuting opened a new issue #12323: Query changes on Sql Lab do not reflect on Slices that use them

stevensuting opened a new issue #12323:
URL: https://github.com/apache/superset/issues/12323


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org