You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jack (JIRA)" <ji...@apache.org> on 2019/07/17 11:31:00 UTC

[jira] [Commented] (AIRFLOW-4825) BigQueryOperator execute a list of SQL queries doesn't work

    [ https://issues.apache.org/jira/browse/AIRFLOW-4825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16886942#comment-16886942 ] 

jack commented on AIRFLOW-4825:
-------------------------------

probably.

> BigQueryOperator execute a list of SQL queries doesn't work
> -----------------------------------------------------------
>
>                 Key: AIRFLOW-4825
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4825
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: documentation, gcp, operators
>    Affects Versions: 1.10.2
>            Reporter: Evgeny
>            Priority: Major
>
> The documentation of bigquery_operator says that I can send to the field sql in BigQueryOperator a list of strings where each string is a SQL query.
> 1. When i'm trying to runĀ  DAG with the code below, i'm receiving the error "TypeError: query argument must have a type (<class 'str'>,) not <class 'list'>" .
> sql_1 = """select 1 from ...
> sql_2 = """select 2 from ...
> list_of_queries = list([sql_1,sql_2])
> updates = BigQueryOperator(
>  task_id="Updates_\{0}".format(new_profile_name),
>  sql=list_of_queries,
>  allow_large_results=True,
>  use_legacy_sql=False,
>  bigquery_conn_id="bigquery_default",
>  dag=dag
> )
> 2. Does the execution order of the queries is identical to the list indexes?



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)