You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/04/05 18:45:00 UTC

[jira] [Resolved] (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:all-tabpanel ]

Ash Berlin-Taylor resolved AIRFLOW-3855.
----------------------------------------
    Resolution: Duplicate

> 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
>             Fix For: 1.10.3
>
>
> 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)