diff --git a/core/src/datayoga_core/blocks/relational/write/block.py b/core/src/datayoga_core/blocks/relational/write/block.py index cb08336d..4540393f 100644 --- a/core/src/datayoga_core/blocks/relational/write/block.py +++ b/core/src/datayoga_core/blocks/relational/write/block.py @@ -152,7 +152,7 @@ def generate_upsert_stmt(self) -> Any: relational_utils.construct_table_reference(self.tbl, with_brackets=True), ", ".join([f"{sa.bindparam(column)}" for column in self.business_key_columns]), ", ".join([f"[{column}]" for column in self.business_key_columns]), - "AND ".join([f"target.[{column}] = source.[{column}]" for column in self.business_key_columns]), + " AND ".join([f"target.[{column}] = source.[{column}]" for column in self.business_key_columns]), ", ".join([f"[{column}]" for column in self.columns]), ", ".join([f"{sa.bindparam(column)}" for column in self.columns]), ", ".join([f"target.[{column}] = {sa.bindparam(column)}" for column in self.mapping_columns]) @@ -166,7 +166,7 @@ def generate_upsert_stmt(self) -> Any: WHEN MATCHED THEN UPDATE SET %s """ % ( relational_utils.construct_table_reference(self.tbl), - "AND ".join([f"target.{column} = :{column}" for column in self.business_key_columns]), + " AND ".join([f"target.{column} = :{column}" for column in self.business_key_columns]), ", ".join([f"{column}" for column in self.columns]), ", ".join([f"{sa.bindparam(column)}" for column in self.columns]), ", ".join([f"target.{column} = {sa.bindparam(column)}" for column in self.mapping_columns])