Skip to content

Commit ca762b9

Browse files
sfc-gh-kteradasfc-gh-aling
authored andcommitted
Update snowdialect.py
lint test failure cleanup attempt
1 parent 67e1764 commit ca762b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/snowflake/sqlalchemy/snowdialect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ def get_check_constraints(self, connection, table_name, schema, **kw):
320320

321321
@reflection.cache
322322
def _get_table_primary_keys(self, connection, schema, table_name, **kw):
323-
fully_qualified_path = self._denormalize_quote_join(schema, table_name)
324323
if table_name.upper() in RESERVED_WORDS:
324+
fully_qualified_path = self._denormalize_quote_join(schema, table_name)
325325
result = connection.execute(
326326
text(
327327
f"SHOW /* sqlalchemy:_get_table_primary_keys */PRIMARY KEYS IN TABLE {fully_qualified_path}"
@@ -389,8 +389,8 @@ def get_pk_constraint(self, connection, table_name, schema=None, **kw):
389389

390390
@reflection.cache
391391
def _get_table_unique_constraints(self, connection, schema, table_name, **kw):
392-
fully_qualified_path = self._denormalize_quote_join(schema, table_name)
393392
if table_name.upper() in RESERVED_WORDS:
393+
fully_qualified_path = self._denormalize_quote_join(schema, table_name)
394394
result = connection.execute(
395395
text(
396396
f"SHOW /* sqlalchemy:_get_table_unique_constraints */ UNIQUE KEYS IN TABLE {fully_qualified_path}"
@@ -471,9 +471,9 @@ def get_unique_constraints(self, connection, table_name, schema, **kw):
471471

472472
@reflection.cache
473473
def _get_table_foreign_keys(self, connection, schema, table_name, **kw):
474-
fully_qualified_path = self._denormalize_quote_join(schema, table_name)
475474
_, current_schema = self._current_database_schema(connection, **kw)
476475
if table_name.upper() in RESERVED_WORDS:
476+
fully_qualified_path = self._denormalize_quote_join(schema, table_name)
477477
result = connection.execute(
478478
text(
479479
f"SHOW /* sqlalchemy:_get_table_foreign_keys */ IMPORTED KEYS IN TABLE {fully_qualified_path}"

0 commit comments

Comments
 (0)