Repository: incubator-airflow Updated Branches: refs/heads/master ba0b1978d -> fd4360b9f
[AIRFLOW-2053] Fix quote character bug in BQ hook Modified the condition to check if the quote_character is set. This will allow to set `quote_character` as empty string when the data doesn't contain quoted sections. Closes #2996 from kaxil/bq_hook_quote_fix Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/fd4360b9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/fd4360b9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/fd4360b9 Branch: refs/heads/master Commit: fd4360b9f0954b3dd4a960153178a06112f05a33 Parents: ba0b197 Author: Kaxil Naik <kaxiln...@gmail.com> Authored: Fri Feb 2 09:31:35 2018 +0100 Committer: Fokko Driesprong <fokkodriespr...@godatadriven.com> Committed: Fri Feb 2 09:31:35 2018 +0100 ---------------------------------------------------------------------- airflow/contrib/hooks/bigquery_hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/fd4360b9/airflow/contrib/hooks/bigquery_hook.py ---------------------------------------------------------------------- diff --git a/airflow/contrib/hooks/bigquery_hook.py b/airflow/contrib/hooks/bigquery_hook.py index cd6bf32..120cee0 100644 --- a/airflow/contrib/hooks/bigquery_hook.py +++ b/airflow/contrib/hooks/bigquery_hook.py @@ -799,7 +799,7 @@ class BigQueryBaseCursor(LoggingMixin): src_fmt_configs['skipLeadingRows'] = skip_leading_rows if 'fieldDelimiter' not in src_fmt_configs: src_fmt_configs['fieldDelimiter'] = field_delimiter - if quote_character: + if quote_character is not None: src_fmt_configs['quote'] = quote_character if allow_quoted_newlines: src_fmt_configs['allowQuotedNewlines'] = allow_quoted_newlines