@@ -455,7 +455,8 @@ def drop_stage(self, stage: SnowflakeStage) -> None:
455455 # ---------------------------------------------------------
456456
457457 def is_native_autodetect_schema_available ( # skipcq: PYL-R0201
458- self , file : File # skipcq: PYL-W0613
458+ self ,
459+ file : File , # skipcq: PYL-W0613
459460 ) -> bool :
460461 """
461462 Check if native auto detection of schema is available.
@@ -585,7 +586,9 @@ def create_table_using_schema_autodetection(
585586 self .truncate_table (table )
586587
587588 def is_native_load_file_available (
588- self , source_file : File , target_table : BaseTable # skipcq PYL-W0613, PYL-R0201
589+ self ,
590+ source_file : File ,
591+ target_table : BaseTable , # skipcq PYL-W0613, PYL-R0201
589592 ) -> bool :
590593 """
591594 Check if there is an optimised path for source to destination.
@@ -654,7 +657,9 @@ def _get_table_columns_count(self, table_name: str) -> int:
654657 try :
655658 table_columns_count = int (
656659 self .hook .run (
657- sql_statement , parameters = {"table_name" : table_name }, handler = lambda cur : cur .fetchone ()
660+ sql_statement ,
661+ parameters = {"table_name" : table_name },
662+ handler = lambda cur : cur .fetchone (),
658663 )[0 ]
659664 )
660665 except AttributeError : # pragma: no cover
@@ -1059,7 +1064,7 @@ def get_merge_initialization_query(cls, parameters: tuple) -> str:
10591064 identifier_enclosure = '"'
10601065
10611066 constraints = "," .join ([f"{ identifier_enclosure } { p } { identifier_enclosure } " for p in parameters ])
1062- sql = "ALTER TABLE {{table}} ADD CONSTRAINT airflow UNIQUE (%s)" % constraints # skipcq PYL-C0209
1067+ sql = f "ALTER TABLE {{{{ table}}}} ADD CONSTRAINT airflow UNIQUE ({ constraints } )"
10631068 return sql
10641069
10651070 def openlineage_dataset_name (self , table : BaseTable ) -> str :
0 commit comments