You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ivan Ukhov (JIRA)" <ji...@apache.org> on 2019/03/09 08:54:00 UTC
[jira] [Commented] (AIRFLOW-3855) Incorrect type of query_params
being required in BigQueryOperator
[ https://issues.apache.org/jira/browse/AIRFLOW-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16788580#comment-16788580 ]
Ivan Ukhov commented on AIRFLOW-3855:
-------------------------------------
It is a duplicate of AIRFLOW-3792. It has been resolved in [0c797a8|https://github.com/apache/airflow/commit/0c797a830e3370bd6e39f5fcfc128a8fd776912e]. Thanks [~ogirardot]!
> 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:
> {quote}
> configuration.query.queryParameters[] list Query parameters for standard SQL queries.
> {quote}
> 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)