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

Add SQL Check Operators to Snowflake Provider #17694

Closed
denimalpaca opened this issue Aug 18, 2021 · 1 comment · Fixed by #17741
Closed

Add SQL Check Operators to Snowflake Provider #17694

denimalpaca opened this issue Aug 18, 2021 · 1 comment · Fixed by #17741
Assignees
Labels
kind:feature Feature Requests provider:snowflake Issues related to Snowflake provider

Comments

@denimalpaca
Copy link
Contributor

Add SnowflakeCheckOperator, SnowflakeValueCheckOperator, and SnowflakeIntervalCheckOperator to Snowflake provider.

Use case / motivation

The SQL operator, as well as other provider DB operators, already support this functionality. It can prove useful for data quality use cases with Snowflake. It should be relatively easy to implement in the same fashion as BigQuery's versions.

Are you willing to submit a PR?

Yep!

Related Issues

Not that I could find.

@denimalpaca denimalpaca added the kind:feature Feature Requests label Aug 18, 2021
@potiuk
Copy link
Member

potiuk commented Aug 18, 2021

Feel free!

@eladkal eladkal added the provider:snowflake Issues related to Snowflake provider label Aug 19, 2021
denimalpaca added a commit to denimalpaca/airflow that referenced this issue Aug 19, 2021
The SnowflakeCheckOperator, SnowflakeValueCheckOperator, and
SnowflakeIntervalCheckOperators are added as subclasses of their respective
SQL Operators. These additions follow the conventions set in the BigQueryOperators
subclassing from the same SQL_CheckOperators. This decision was made despite the
existing SnowflakeOperator, as subclassing both SnowflakeOperator and a SQL_CheckOperator
caused a couple issues:
  1. Both operators have an execute method already, so some precaution would be
	 necessary to choose the correct one.
  2. An issue with the `sql` parameter occured, where if it was given as a kwarg (sql=sql),
	 then the BaseOperator init() would through an exception for missing args, as if
	 it weren't being added to **kwargs correctly.
kaxil pushed a commit that referenced this issue Sep 9, 2021
Add three new Snowflake operators based on SQL Checks

The SnowflakeCheckOperator, SnowflakeValueCheckOperator, and
SnowflakeIntervalCheckOperators are added as subclasses of their respective
SQL Operators. These additions follow the conventions set in the BigQueryOperators
subclassing from the same SQL_CheckOperators.

closes: #17694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature Feature Requests provider:snowflake Issues related to Snowflake provider
Projects
None yet
3 participants