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

   ### Apache Airflow Provider(s)
   
   snowflake
   
   ### Versions of Apache Airflow Providers
   
   `apache-airflow-providers-snowflake==4.0.2`
   
   ### Apache Airflow version
   
   2.5.1
   
   ### Operating System
   
   Debian GNU/Linux 11 (bullseye)
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   After upgrading the _apache-airflow-providers-snowflake_ from version 
**3.3.0** to **4.0.2**, the SnowflakeCheckOperator tasks starts to throw the 
following error:
   
   ```
     File 
"/home/airflow/.local/lib/python3.9/site-packages/airflow/providers/common/sql/operators/sql.py",
 line 179, in get_db_hook
       return self._hook
     File "/usr/local/lib/python3.9/functools.py", line 993, in __get__
       val = self.func(instance)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/airflow/providers/common/sql/operators/sql.py",
 line 141, in _hook
       conn = BaseHook.get_connection(self.conn_id)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/airflow/hooks/base.py", line 
72, in get_connection
       conn = Connection.get_connection_from_secrets(conn_id)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/airflow/models/connection.py",
 line 435, in get_connection_from_secrets
       raise AirflowNotFoundException(f"The conn_id `{conn_id}` isn't defined")
   airflow.exceptions.AirflowNotFoundException: The conn_id `None` isn't defined
   ```
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   - Define a _Snowflake_ Connection with the name **snowflake_default**
   - Create a Task similar to this:
   ```
     my_task = SnowflakeCheckOperator(
         task_id='my_task',
         warehouse='warehouse',
         database='database',
         schema='schema',
         role='role',
         sql='select 1 from my_table'
     )
   ```
   - Run and check the error.
   
   ### Anything else
   
   We can workaround this by adding the conn_id='snowflake_default' to the 
SnowflakeCheckOperator.
   
   ### 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]

Reply via email to