-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-6685] ThresholdCheckOperator #7353
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
|
5c3b6bc
to
e4d2930
Compare
Codecov Report
@@ Coverage Diff @@
## master #7353 +/- ##
==========================================
+ Coverage 86.35% 86.52% +0.17%
==========================================
Files 871 874 +3
Lines 40627 41841 +1214
==========================================
+ Hits 35083 36203 +1120
- Misses 5544 5638 +94
Continue to review full report at Codecov.
|
f6c003b
to
e85e036
Compare
e85e036
to
c1c243b
Compare
In general the operators in this PR sounds like enhancement of CheckOperator
|
@eladkal Thanks for bringing this to mind. I do see that there is some functionality that I have that |
|
||
def push(self, meta_data): | ||
""" | ||
Optional: Send data check info and metadata to an external database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can this be set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When inheriting from this class, push can be overwritten
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Awesome work, congrats on your first merged pull request! |
* [AIRFLOW-6685] Data Quality Check operators * removed .get_connection to get hook in get_sql_value * added tests for get_sql_value * threshold check operator and tests added to checkoperator file (cherry picked from commit 4c6ae18)
This PR includes a new operator in
CheckOperator
that allows users to perform a threshold data quality check.ThresholdCheckOperator
will check a single value, sql result against a threshold range, and will fail a task if it is outside this range. The lower and upper bound of the threshold can be defined as either a numeric values, or sql-statements that returns a numeric value.Issue link: AIRFLOW-6685
Make sure to mark the boxes below before creating PR: [x]
[AIRFLOW-NNNN]
. AIRFLOW-NNNN = JIRA ID** For document-only changes commit message can start with
[AIRFLOW-XXXX]
.In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.