Skip to content

Commit

Permalink
Include delim/quote chars in COPY config
Browse files Browse the repository at this point in the history
  • Loading branch information
jwills committed Feb 11, 2024
1 parent 0e270b7 commit f918c0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target_duckdb/db_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def load_rows(self, records, count, temp_dir):
)
for record in records:
csvwriter.writerow(self.record_to_flattened(record))
cur.execute("COPY {} FROM '{}'".format(temp_table, temp_file_csv))
cur.execute("COPY {} FROM '{}' WITH (delim '{}', quote '{}')".format(temp_table, temp_file_csv, self.delimiter, self.quotechar))

if len(self.stream_schema_message["key_properties"]) > 0:
cur.execute(self.update_from_temp_table(temp_table))
Expand Down

0 comments on commit f918c0d

Please sign in to comment.