xnuinside edited a comment on issue #4274: [AIRFLOW-3438] Fix default values in BigQuery Hook & BigQueryOperator URL: https://github.com/apache/incubator-airflow/pull/4274#issuecomment-445470507 @kaxil, I found one more issue :/ it's not relative to your PR, but relative to my :( <img width="400" alt="screen shot 2018-12-08 at 19 06 22" src="https://user-images.githubusercontent.com/15959809/49687987-75465600-fb1c-11e8-9be4-c7d775cf717e.png"> need change https://github.com/apache/incubator-airflow/blob/85bdd8103a2e318b14e025a28715b56b8f69b33a/airflow/contrib/operators/bigquery_operator.py#L109 to `destination_dataset_table=None,` also, I found very strange behavior and I can not find the reason. I have such test DAG: ``` dag = DAG(dag_id="test_dag", start_date=datetime(2018, 12, 8)) task = BigQueryOperator(task_id="bigquery_test", dag=dag, sql="SELECT * FROM hh_for_run.delta_ts;") def query(): BigQueryHook().get_conn().cursor().run_query( sql="SELECT * FROM hh_for_run.delta_ts;") task_1 = PythonOperator(task_id="hook_s", python_callable=query, dag=dag) ``` And task that work with BigQueryOperator fails with such error: ``` [2018-12-08 17:12:48,558] {base_task_runner.py:98} INFO - Subtask: cluster_fields=self.cluster_fields, [2018-12-08 17:12:48,559] {base_task_runner.py:98} INFO - Subtask: File "/home/airflow/gcs/dags/dagutils/airflow_master/hooks/bigquery_hook.py", line 681, in run_query [2018-12-08 17:12:48,561] {base_task_runner.py:98} INFO - Subtask: param_type) [2018-12-08 17:12:48,562] {base_task_runner.py:98} INFO - Subtask: File "/home/airflow/gcs/dags/dagutils/airflow_master/hooks/bigquery_hook.py", line 1796, in _validate_value [2018-12-08 17:12:48,562] {base_task_runner.py:98} INFO - Subtask: key, expected_type, type(value))) [2018-12-08 17:12:48,563] {base_task_runner.py:98} INFO - Subtask: TypeError: query argument must have a type <type 'str'> not <type 'unicode'> ``` but task_1 with PythonOperator works correctly. But query same.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
