[ https://issues.apache.org/jira/browse/AIRFLOW-4825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16868729#comment-16868729 ]
jack commented on AIRFLOW-4825: ------------------------------- It doesn't support list. The BigQuery hook support only str: [https://github.com/apache/airflow/blob/7bacddea45ff235f8b722d76d8c56eb7604792a4/airflow/contrib/hooks/bigquery_hook.py#L657] Maybe it was intended that the operator will loop over the list of str and execute one by one? [~kaxilnaik] might know. > 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: 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.3#76005)