Skip to content

Commit

Permalink
[AIRFLOW-6505] Let emoji encoded properly for json.dumps()
Browse files Browse the repository at this point in the history
  • Loading branch information
damon09273 committed Feb 13, 2020
1 parent 1e00243 commit 1e38000
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/providers/google/cloud/operators/sql_to_gcs.py
Expand Up @@ -178,7 +178,9 @@ def _write_local_data_files(self, cursor):
row_dict = dict(zip(schema, row))

# TODO validate that row isn't > 2MB. BQ enforces a hard row size of 2MB.
tmp_file_handle.write(json.dumps(row_dict, sort_keys=True).encode('utf-8'))
tmp_file_handle.write(
json.dumps(row_dict, sort_keys=True, ensure_ascii=False).encode("utf-8")
)

# Append newline to make dumps BigQuery compatible.
tmp_file_handle.write(b'\n')
Expand Down

0 comments on commit 1e38000

Please sign in to comment.