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/06/21 12:18:41 UTC

[GitHub] [superset] hughhhh commented on a diff in pull request #20281: feat: Visualize SqlLab.Query model data in Explore 📈

hughhhh commented on code in PR #20281:
URL: https://github.com/apache/superset/pull/20281#discussion_r902547147


##########
superset/common/query_context_factory.py:
##########
@@ -80,6 +80,11 @@ def create(
 
     # pylint: disable=no-self-use
     def _convert_to_model(self, datasource: DatasourceDict) -> BaseDatasource:
-        return ConnectorRegistry.get_datasource(
-            str(datasource["type"]), int(datasource["id"]), db.session
+        from superset.dao.datasource.dao import DatasourceDAO

Review Comment:
   we are currently getting circuliar dependency issues if we don't wrap the imports in the functions, we have another ticket addressing how to fix this.



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