Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Insert changes #412

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions target_snowflake/db_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,22 +455,7 @@ def load_file(self, s3_key, count, size_bytes):
updates = 0

# Insert or Update with MERGE command if primary key defined
if len(self.stream_schema_message['key_properties']) > 0:
try:
inserts, updates = self._load_file_merge(
s3_key=s3_key,
stream=stream,
columns_with_trans=columns_with_trans
)
except Exception as ex:
self.logger.error(
'Error while executing MERGE query for table "%s" in stream "%s"',
self.table_name(stream, False), stream
)
raise ex

# Insert only with COPY command if no primary key
else:
if len(self.stream_schema_message['key_properties']) >= 0:
try:
inserts, updates = (
self._load_file_copy(
Expand Down