You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "snc-lin (via GitHub)" <gi...@apache.org> on 2025/02/25 10:39:43 UTC
[I] When the field of providers-google is False, the value is incorrect [airflow]
snc-lin opened a new issue, #47053:
URL: https://github.com/apache/airflow/issues/47053
### Apache Airflow Provider(s)
google
### Versions of Apache Airflow Providers
12.0.0
### Apache Airflow version
2.10.5
### Operating System
Ubuntu 22.04.5 LTS
### Deployment
Docker-Compose
### Deployment details
_No response_
### What happened
If the value of the GoogleBaseHook field is False, it always returns the default value.
Specifically, even if use_legacy_sql in BigQueryHook is set to False, it still returns the default value of True.
### What you think should happen instead
If use_legacy_sql in BigQueryHook is set to False, the use_legacy_sql parameter should also be False.
### How to reproduce
Create a BigQuery connection with use_legacy_sql set to False (e.g. `bigquery_default`).
Create a BigQuery connection with use_legacy_sql set to False (for example, bigquery_default). And, run the following code.
```
from airflow.decorators import dag, task
from airflow.providers.google.cloud.hooks.bigquery import BigQueryHook
@dag()
def bigquery_dag():
@task()
def debug():
hook = BigQueryHook.get_hook("bigquery_default")
print(hook.use_legacy_sql)
debug()
bigquery_dag()
```
### Anything else
I think I need to fix the code(https://github.com/apache/airflow/blob/providers-google/12.0.0/providers/src/airflow/providers/google/common/hooks/base_google.py#L412) as follows.
before:
`return hasattr(self, "extras") and get_field(self.extras, f) or default`
after:
```
if hasattr(self, "extras") and get_field(self.extras, f) is not None:
return get_field(self.extras, f)
else:
default
```
### Are you willing to submit PR?
- [ ] 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
Re: [I] When the field of providers-google is False, the value is incorrect [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #47053:
URL: https://github.com/apache/airflow/issues/47053#issuecomment-2688801905
Assigned.
--
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
Re: [I] When the field of providers-google is False, the value is incorrect [airflow]
Posted by "alamashir (via GitHub)" <gi...@apache.org>.
alamashir commented on issue #47053:
URL: https://github.com/apache/airflow/issues/47053#issuecomment-3536630521
looks like this is not fixed yet, can you assign it to me @potiuk
--
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
Re: [I] When the field of providers-google is False, the value is incorrect [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #47053: When the field of providers-google is False, the value is incorrect
URL: https://github.com/apache/airflow/issues/47053
--
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
Re: [I] When the field of providers-google is False, the value is incorrect [airflow]
Posted by "kiran2706 (via GitHub)" <gi...@apache.org>.
kiran2706 commented on issue #47053:
URL: https://github.com/apache/airflow/issues/47053#issuecomment-2688538367
@karenbraganz, could you please assign this to me?
--
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