fix: calls to _get_sqla_engine (#24953)

(cherry picked from commit 6f24a4e7a8)
This commit is contained in:
Beto Dealmeida
2023-08-11 03:54:01 -07:00
committed by Michael S. Molina
parent 5d8c65ae6f
commit ff2ec23102
5 changed files with 36 additions and 37 deletions

View File

@@ -120,9 +120,8 @@ def drop_table_if_exists(table_name: str, table_type: CtasMethod) -> None:
def quote_f(value: Optional[str]):
if not value:
return value
return get_example_database().inspector.engine.dialect.identifier_preparer.quote_identifier(
value
)
with get_example_database().get_inspector_with_context() as inspector:
return inspector.engine.dialect.identifier_preparer.quote_identifier(value)
def cta_result(ctas_method: CtasMethod):