You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shahar1 (via GitHub)" <gi...@apache.org> on 2023/05/19 18:20:48 UTC

[GitHub] [airflow] shahar1 opened a new issue, #31432: `BigQueryGetDataOperator`'s query job is bugged in deferrable mode when `project_id` is not provided

shahar1 opened a new issue, #31432:
URL: https://github.com/apache/airflow/issues/31432

   ### Apache Airflow version
   
   main (development)
   
   ### What happened
   
   When not providing a `project_id` to `BigQueryGetDataOperator` in deferrable mode (`project_id=None`), the query generated by `generate_query` method is bugged, i.e.,: 
   
   ````sql
   from `None.DATASET.TABLE_ID` limit ...
   ````
   
   ### What you think should happen instead
   
   When `project_id` is `None` - it should be removed from the query along with the trailing dot, i.e.,:
   
   ````sql
   from `DATASET.TABLE_ID` limit ...
   ````
   
   ### How to reproduce
   
   Create a DAG file with `BigQueryGetDataOperator` defined as follows:
   ```python
   BigQueryGetDataOperator(
           task_id="bq_get_data_op",
           # project_id="PROJECT_ID",  <-- Not provided
           dataset_id="DATASET",
           table_id="TABLE",
           use_legacy_sql=False,
           deferrable=True
       )
   ````
   
   
   
   ### Operating System
   
   Debian
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   The `generate_query` method is not unit tested (which would have prevented it in the first place) - will be better to add one.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] hussein-awala closed issue #31432: `BigQueryGetDataOperator`'s query job is bugged in deferrable mode

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala closed issue #31432: `BigQueryGetDataOperator`'s query job is bugged in deferrable mode
URL: https://github.com/apache/airflow/issues/31432


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org