[
https://issues.apache.org/jira/browse/AIRFLOW-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Ukhov updated AIRFLOW-3855:
--------------------------------
Description:
BigQueryOperator has been requiring query_params to be a dict for quite some
time:
[https://github.com/apache/airflow/blob/1.10.2/airflow/contrib/hooks/bigquery_hook.py#L678]
However, according to Google’s API is has to be a list:
[https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query]
See configuration.query.queryParameters.
Prior to 1.10.2, it was not actually checked, and passing a list was working
fine. Since 1.10.2, it no longer works, as a check is in place and raises an
exception.
If one tries to pass a dict, as suggested by Airflow’s documentation, an
exception is raised on BigQuery’s side, as query parameters do not get through,
which is likely to be due to queryParameters (as a dict) being translated into
something that BigQuery does not understand.
was:
BigQueryOperator has been requiring query_params to be a dict for quite some
time:
https://github.com/apache/airflow/blob/1.10.2/airflow/contrib/hooks/bigquery_hook.py#L678
However, according to Google’s API is has to be a list:
[https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query]
See configuration.query.queryParameters.
Prior to 1.10.2, it was not actually actually checked, and passing a list was
working fine. Since 1.10.2, it no longer works, as a check is in place and
raises an exception.
If one tries to pass a dict, as suggested by Airflow’s documentation, an
exception is raised on BigQuery’s side, as query parameters do not get through,
which is likely to be due to queryParameters (as a dict) being translated into
something that BigQuery does not understand.
> Incorrect type of query_params being required in BigQueryOperator
> -----------------------------------------------------------------
>
> Key: AIRFLOW-3855
> URL: https://issues.apache.org/jira/browse/AIRFLOW-3855
> Project: Apache Airflow
> Issue Type: Bug
> Components: api, gcp
> Affects Versions: 1.10.2
> Reporter: Ivan Ukhov
> Priority: Major
>
> BigQueryOperator has been requiring query_params to be a dict for quite some
> time:
> [https://github.com/apache/airflow/blob/1.10.2/airflow/contrib/hooks/bigquery_hook.py#L678]
> However, according to Google’s API is has to be a list:
> [https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query]
> See configuration.query.queryParameters.
> Prior to 1.10.2, it was not actually checked, and passing a list was working
> fine. Since 1.10.2, it no longer works, as a check is in place and raises an
> exception.
> If one tries to pass a dict, as suggested by Airflow’s documentation, an
> exception is raised on BigQuery’s side, as query parameters do not get
> through, which is likely to be due to queryParameters (as a dict) being
> translated into something that BigQuery does not understand.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)