You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/06/20 07:09:01 UTC

[GitHub] [superset] villebro commented on pull request #23729: chore: migrate `sqllab_viz` endpoint to api v1

villebro commented on PR #23729:
URL: https://github.com/apache/superset/pull/23729#issuecomment-1598231464

   @hughhhh  @betodealmeida @jfrag1 @Antonio-RiveroMartnez this PR appears to have caused a nasty regression, namely it's now impossible to save a chart from a query that hasn't been saved as a dataset first: saving triggers an "Unknown field." error:
   
   <img width="971" alt="image" src="https://github.com/apache/superset/assets/33317356/d64314ca-4e78-49a3-8065-3e7f5865f4cf">
   
   Interestingly the "Save as dataset" flow works:
   
   <img width="411" alt="image" src="https://github.com/apache/superset/assets/33317356/b2c580a1-5638-4afc-8cd3-d432f19675f3">
   
   This is happening, because in the main "Save" workflow we're sending a POST to `/api/v1/dataset/` with the same type of payload that we were sending previously to `/superset/sqllab_viz/`:
   
   <img width="612" alt="image" src="https://github.com/apache/superset/assets/33317356/f347f3dd-6a33-4949-bfed-3a0e6364506d">
   
   As can be seen here, the schema doesn't support `columns`, nor `template_params`: https://github.com/apache/superset/blob/3e76736874f5a7b1ca35a9f3b13cbb4bc3791f69/superset/datasets/schemas.py#L79-L87
   
   I think we need to DRY up these flows, as it feels unnecessary to have a different code path for saving the dataset in "Save as dataset" vs the main "Save" button..


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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