Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate SnowflakeSqlApiOperatorAsync #1447

Merged
merged 20 commits into from
Jan 29, 2024

Conversation

vatsrahul1001
Copy link
Contributor

@vatsrahul1001 vatsrahul1001 commented Jan 22, 2024

Deprecate SnowflakeSqlApiOperatorAsync and fallback to its Airflow OSS provider's counterpart SnowflakeSqlApiOperator with deferrable=True

closes: #1415

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (84cfc6b) 98.22% compared to head (601f004) 98.20%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1447      +/-   ##
==========================================
- Coverage   98.22%   98.20%   -0.02%     
==========================================
  Files          91       91              
  Lines        4733     4684      -49     
==========================================
- Hits         4649     4600      -49     
  Misses         84       84              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add deprecation warning to SnowflakeSqlApiHookAsync as well?

@vatsrahul1001 vatsrahul1001 force-pushed the deprecate-SnowflakeSqlApiOperator branch from 76a0574 to 3acabbc Compare January 23, 2024 03:13
@vatsrahul1001
Copy link
Contributor Author

Should we add deprecation warning to SnowflakeSqlApiHookAsync as well?

adding warning

@vatsrahul1001 vatsrahul1001 marked this pull request as draft January 24, 2024 06:06
@pankajkoti
Copy link
Collaborator

Verified running a DAG locally with these changes that it enters deferred state and then succeeds

Screenshot 2024-01-29 at 3 01 06 PM Screenshot 2024-01-29 at 3 04 09 PM

@pankajkoti pankajkoti marked this pull request as ready for review January 29, 2024 09:40
from airflow.exceptions import AirflowException

from snowflake.connector import SnowflakeConnection
from snowflake.connector.constants import QueryStatus

try:
from airflow.providers.snowflake.operators.snowflake import SnowflakeOperator
from airflow.providers.snowflake.operators.snowflake import SnowflakeOperator, SnowflakeSqlApiOperator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to move this SnowflakeSqlApiOperator import outside of this block

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove SnowflakeOperator here. We've update our snowflake provider version

@pankajkoti pankajkoti merged commit 6167579 into main Jan 29, 2024
11 checks passed
@pankajkoti pankajkoti deleted the deprecate-SnowflakeSqlApiOperator branch January 29, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate snowflake async provider
3 participants