Skip to content

Add Deferrable switch to SnowflakeSqlApiOperator - #31596

Merged
potiuk merged 22 commits into
apache:mainfrom
utkarsharma2:DeferrableSnowflakeSqlApiOperator
Jul 4, 2023
Merged

Add Deferrable switch to SnowflakeSqlApiOperator#31596
potiuk merged 22 commits into
apache:mainfrom
utkarsharma2:DeferrableSnowflakeSqlApiOperator

Conversation

@utkarsharma2

Copy link
Copy Markdown
Contributor

This PR donates the SnowflakeSqlApiOperator deferrable developed in astronomer-providers repo to Apache airflow.

@utkarsharma2
utkarsharma2 marked this pull request as draft May 29, 2023 13:24
@utkarsharma2
utkarsharma2 marked this pull request as ready for review May 30, 2023 04:30
@Lee-WLee-W mentioned this pull request Jun 6, 2023
Comment threadairflow/providers/snowflake/hooks/snowflake_sql_api.py Outdated
utkarsharma2and others added 2 commits June 13, 2023 16:00

@phanikumvphanikumv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

Comment threadairflow/providers/snowflake/triggers/snowflake_trigger.py Outdated
Comment threadairflow/providers/snowflake/triggers/snowflake_trigger.py Outdated
Comment threadairflow/providers/snowflake/triggers/snowflake_trigger.py Outdated
Comment threadairflow/providers/snowflake/triggers/snowflake_trigger.py Outdated
Comment threadairflow/providers/snowflake/triggers/snowflake_trigger.py Outdated
Comment threadairflow/providers/snowflake/hooks/snowflake_sql_api.py Outdated
Comment on lines +274 to +275
resp = await response.json()
return self._process_response(status_code, resp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we should make the response body be fetched lazily, what could take a while (and might actually be the part worth deferring—not sure)

@utkarsharma2utkarsharma2Jun 19, 2023

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@uranusjr I'm not sure I understand you completely, but based on what I got. The function get_sql_api_query_status_async is called indirectly when we are polling for the status of the query within triggered. So deferring it would not be ideal, right?

utkarsharma2and others added 2 commits June 16, 2023 14:12
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Comment threadairflow/providers/snowflake/triggers/snowflake_trigger.py Outdated
utkarsharma2and others added 4 commits June 19, 2023 07:29
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
@utkarsharma2
utkarsharma2force-pushed the DeferrableSnowflakeSqlApiOperator branch from 07d3fae to b39b57bCompareJune 28, 2023 11:06
@potiuk

Copy link
Copy Markdown
Member

I think you should rebase/solve conflicts on that one jsut to be sure.

Comment threadairflow/providers/snowflake/hooks/snowflake_sql_api.py Outdated
@potiuk
potiuk merged commit 891c2e4 into apache:mainJul 4, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providerskind:documentationprovider:snowflakeIssues related to Snowflake provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@utkarsharma2@potiuk@uranusjr@jedcunningham@phanikumv