chore(ssh-tunnel): Refactor establishing raw connection with contextmanger (#22366)

This commit is contained in:
Hugh A. Miles II
2022-12-29 14:20:45 -05:00
committed by GitHub
parent b6d39d194c
commit 9c0d6c51f1
9 changed files with 112 additions and 140 deletions

View File

@@ -162,6 +162,8 @@ class PrestoDBSQLValidator(BaseSQLValidator):
statements = parsed_query.get_statements()
logger.info("Validating %i statement(s)", len(statements))
# todo(hughhh): update this to use new database.get_raw_connection()
# this function keeps stalling CI
with database.get_sqla_engine_with_context(
schema, source=QuerySource.SQL_LAB
) as engine: