You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/19 16:34:43 UTC

[GitHub] [airflow] drboyer opened a new issue #15948: Snowflake connections do not work correctly with SqlSensor

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:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #15948: Snowflake connections do not work correctly with SqlSensor

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #15948:
URL: https://github.com/apache/airflow/issues/15948#issuecomment-844315462


   AS explained in the PR - sorry but Airflow 1.10 End of Life is 17 th of June and we are only implementing cirtical/security fixes in 1.10. Snowflake provider works well in 2.0 (auto-detection of DBHook compliant hooks is implemented there).
   
   I heartily recommend to move to Airflow 2 as 1.10 will not even receive critical security fixes after June 17th (less than a month from now)


-- 
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:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #15948: Snowflake connections do not work correctly with SqlSensor

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #15948:
URL: https://github.com/apache/airflow/issues/15948#issuecomment-844272592


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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:
users@infra.apache.org



[GitHub] [airflow] potiuk closed issue #15948: Snowflake connections do not work correctly with SqlSensor

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #15948:
URL: https://github.com/apache/airflow/issues/15948


   


-- 
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:
users@infra.apache.org



[GitHub] [airflow] drboyer commented on issue #15948: Snowflake connections do not work correctly with SqlSensor

Posted by GitBox <gi...@apache.org>.
drboyer commented on issue #15948:
URL: https://github.com/apache/airflow/issues/15948#issuecomment-844319713


   I see, thanks for taking a look. We'll definitely have to look into it, given the upcoming EOL.


-- 
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:
users@infra.apache.org



[GitHub] [airflow] drboyer edited a comment on issue #15948: Snowflake connections do not work correctly with SqlSensor

Posted by GitBox <gi...@apache.org>.
drboyer edited a comment on issue #15948:
URL: https://github.com/apache/airflow/issues/15948#issuecomment-844319713


   I see, thanks for taking a look. We'll definitely have to look into the 2.0 migration, given the upcoming EOL.


-- 
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:
users@infra.apache.org