diff --git a/superset/common/query_context.py b/superset/common/query_context.py index 59bd8b5b49cc9..21b0dac368bc6 100644 --- a/superset/common/query_context.py +++ b/superset/common/query_context.py @@ -19,7 +19,7 @@ def __init__( queries: List[Dict], ): self.datasource = ConnectorRegistry.get_datasource(datasource.get('type'), - datasource.get('id'), + int(datasource.get('id')), db.session) self.queries = list(map(lambda query_obj: QueryObject(**query_obj), queries))