From 6748e320f2a573040fc787270eb20953e489f3e2 Mon Sep 17 00:00:00 2001 From: Charles Julian Knight Date: Fri, 13 Aug 2021 15:52:21 -0400 Subject: [PATCH] fix escaping --- target_snowflake/snowflake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target_snowflake/snowflake.py b/target_snowflake/snowflake.py index 93250e6..3b26fa4 100644 --- a/target_snowflake/snowflake.py +++ b/target_snowflake/snowflake.py @@ -288,7 +288,7 @@ def add_table_mapping(self, cur, from_path, metadata): def serialize_table_record_null_value(self, remote_schema, streamed_schema, field, value): if value is None: - return '\\\\N' + return '\\N' return value def serialize_table_record_datetime_value(self, remote_schema, streamed_schema, field, value): @@ -526,7 +526,7 @@ def transform(): row = next(rows_iter) with io.StringIO() as out: - writer = csv.DictWriter(out, csv_headers) + writer = csv.DictWriter(out, csv_headers, escapechar='\\', quoting=csv.QUOTE_NONE) writer.writerow(row) return out.getvalue() except StopIteration: