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: