rajeshrout97 opened a new issue, #48508: URL: https://github.com/apache/airflow/issues/48508
### Description Currently, when an Airflow task using SnowflakeOperator is manually terminated or times out, the corresponding query in Snowflake continues running in the background. This can lead to unnecessary resource consumption and increased costs. I propose adding functionality to the SnowflakeOperator to automatically abort the running query in Snowflake when the task is stopped or reaches its execution timeout in Airflow. This would enhance task management, prevent orphaned queries, and improve efficiency when handling long-running queries. ### Use case/motivation - When an Airflow task running a Snowflake query is manually stopped (State = Failed/Killed), the query should also be aborted in Snowflake. - This prevents unnecessary query execution in Snowflake, reducing costs. - It ensures better synchronization between Airflow task states and Snowflake query execution. - Many users expect this behavior by default, but currently, they have to manually identify and kill long-running queries in Snowflake. ### Related issues For **Related Issues**, you can write: 🚀 **No known related issues**. However, this feature aims to improve the Snowflake provider by ensuring queries are canceled when the corresponding Airflow task is killed. ### Are you willing to submit a 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]
