From 6e5199fda6fffb22ca8ee66a42897b43f06ef8e3 Mon Sep 17 00:00:00 2001 From: spicy-sauce Date: Sun, 19 May 2024 09:06:56 +0300 Subject: [PATCH] missing space before AND clause --- core/src/datayoga_core/blocks/relational/write/block.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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])