yzliao-zip opened a new issue, #30408:
URL: https://github.com/apache/airflow/issues/30408
### Apache Airflow Provider(s)
snowflake
### Versions of Apache Airflow Providers
apache-airflow-providers-snowflake==4.0.4
### Apache Airflow version
2.3.4
### Operating System
Linux
### Deployment
Other 3rd-party Helm chart
### Deployment details
_No response_
### What happened
When running this operator
```python
SnowflakeCheckOperator(
task_id="task_name",
snowflake_conn_id=SNOWFLAKE_CONN_ID,
database="database_a",
sql="SELECT COUNT(*) > 0 FROM my_schema.users",
dag=dag,
)
```
Get the error that
```
snowflake.connector.errors.ProgrammingError: 090105 (22000):
01ab5318-0001-0771-0001-3f2201bdf396: Cannot perform SELECT. This session does
not have a current database. Call 'USE DATABASE', or use a qualified name.
```
### What you think should happen instead
The operator should use the database passed as the operator argument and do
not throw the error.
### How to reproduce
Use the operator example above and run a query. The connection id should not
have default database.
### Anything else
_No response_
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]