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 2022/04/20 10:20:46 UTC

[GitHub] [superset] zhaoyongjie commented on a diff in pull request #19782: fix: chart import error with virtual dataset

zhaoyongjie commented on code in PR #19782:
URL: https://github.com/apache/superset/pull/19782#discussion_r853972957


##########
superset/charts/commands/importers/v1/__init__.py:
##########
@@ -89,9 +89,7 @@ def _import(
                 config.update(
                     {
                         "datasource_id": dataset.id,
-                        "datasource_type": "view"
-                        if dataset.is_sqllab_view
-                        else "table",
+                        "datasource_type": "table",

Review Comment:
   I am not familiar with this part, but the `datasource_type = view` seems the correct value here. Here is the schema [defination](https://github.com/apache/superset/blob/22a92ed72278d45049cc33eba5219d215625e4d9/superset/charts/schemas.py#L199-L203) for updating chart.
   
   @betodealmeida could you take a look?



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