Skip to content

Commit

Permalink
Merge pull request #35 from srpwnd/fix/new-line
Browse files Browse the repository at this point in the history
fix: set line terminator chars to correspond with csv writer
  • Loading branch information
jwills authored Mar 12, 2024
2 parents 0e270b7 + 9860959 commit c96527c
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 (new_line '\\r\\n')".format(temp_table, temp_file_csv))

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

0 comments on commit c96527c

Please sign in to comment.