drboyer opened a new issue #15948:
URL: https://github.com/apache/airflow/issues/15948


   **Apache Airflow version**: 1.10.x (issue was partially fixed with #9843 in 
1.10.12, but is not completely fixed in 1.10.15)
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl 
version`): n/a
   
   **Environment**: not relevant here
   
   **What happened**:
   
   When using a Snowflake connection with the SqlSensor, the following 
exception is thrown:
   
   ```
   [2021-05-12 13:51:09,356] {taskinstance.py:1150} ERROR - Unknown hook type 
snowflake
   Traceback (most recent call last):
     File 
"/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 
984, in _run_raw_task
       result = task_copy.execute(context=context)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/sensors/base_sensor_operator.py",
 line 107, in execute
       while not self.poke(context):
     File 
"/usr/local/lib/python3.7/site-packages/airflow/sensors/sql_sensor.py", line 
87, in poke
       hook = self._get_hook()
     File 
"/usr/local/lib/python3.7/site-packages/airflow/sensors/sql_sensor.py", line 
84, in _get_hook
       return conn.get_hook()
     File 
"/usr/local/lib/python3.7/site-packages/airflow/models/connection.py", line 
309, in get_hook
       raise AirflowException("Unknown hook type {}".format(self.conn_type))
   airflow.exceptions.AirflowException: Unknown hook type snowflake
   ```
   
   **What you expected to happen**:
   
   The Snowflake connection is used successfully and the SQL query runs on 
Snowflake.
   
   **How to reproduce it**:
   
   * Add a Snowflake connection
   * Add a `SqlSensor` task to a DAG where the `conn_id` is the Snowflake 
connection
   * Attempt to run the DAG
   
   
   **Anything else we need to know**:
   
   I have a fix that I've made on our internal Airflow instances, but want to 
contribute it back upstream.
   


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to