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 2023/01/04 20:49:57 UTC

[GitHub] [superset] craig-rueda commented on a diff in pull request #22581: fix(ssh-tunnel): fix dataset creation flow through modal for DB with tunnel

craig-rueda commented on code in PR #22581:
URL: https://github.com/apache/superset/pull/22581#discussion_r1061871506


##########
superset/models/core.py:
##########
@@ -744,13 +744,14 @@ def update_params_from_encrypted_extra(self, params: Dict[str, Any]) -> None:
     def get_table(self, table_name: str, schema: Optional[str] = None) -> Table:
         extra = self.get_extra()
         meta = MetaData(**extra.get("metadata_params", {}))
-        return Table(
-            table_name,
-            meta,
-            schema=schema or None,
-            autoload=True,
-            autoload_with=self._get_sqla_engine(),
-        )
+        with self.get_sqla_engine_with_context() as engine:

Review Comment:
   Is there a way to test 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