Skip to content

Commit fcffcc7

Browse files
authored
Merge pull request #1172 from MTES-MCT/feat-csv
fix(csv): always add string quoting
2 parents 25d97a5 + 6e8319d commit fcffcc7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

airflow/include/domain/file_handling/SQLToCSVOnS3Handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def export_sql_result_to_csv_on_s3(self, s3_key: str, s3_bucket: str, sql: str)
3131
f'"{self.db_connection}"',
3232
"public_ocsge.occupation_du_sol",
3333
f'-sql "{sql}"',
34+
"-lco STRING_QUOTING=ALWAYS",
3435
]
3536
try:
3637
subprocess.run(" ".join(cmd), shell=True, stderr=subprocess.STDOUT, check=True)

0 commit comments

Comments
 (0)