feat: add DQDL support via EvaluateDataQuality (#205) - #289
Open
AMC-hawk wants to merge 2 commits into
Open
Conversation
Wrap com.amazon.deequ.dqdl.EvaluateDataQuality so Python users can evaluate DQDL rulesets, including DataFreshness for checking how recent data is. Adds pydeequ.dqdl.EvaluateDataQuality with process() and processRows(), supporting additionalDataSources and pandas output, plus tests and docs.
Author
|
@sudsali Can you please review it. Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: Closes #205
Description of changes:
Deequ already supports data freshness as a DQDL rule (awslabs/deequ#661, in every release since 2.0.14, including the 2.0.21 jar PyDeequ pins). PyDeequ doesn't expose DQDL, so Python users can't use it. This PR adds a thin wrapper around
com.amazon.deequ.dqdl.EvaluateDataQuality.Changes
pydeequ/dqdl.py:EvaluateDataQuality.processandprocessRows, matching the Scala API. SupportsadditionalDataSources={"alias": df}for rules likeRowCountMatch,pandas=Trueoutput, and pandas input (same asVerificationSuite.onData).tests/test_dqdl.py: output schema, passing and failingDataFreshnessrules (including the compliance metric),days/minutesunits,additionalDataSources, pandas output, row-level outcomes, and input validation.README.mdanddocs/source/pydeequ.rst: usage section and API docs.No changes to existing APIs or the Deequ dependency.
Notes
DataFreshnessdoesn't have row-level support in Deequ, soprocessRowslists it underDataQualityRulesSkip. The README says this.dqdldependency.Testing
pytest tests/test_dqdl.py tests/test_verification.py: 15 passed locally (Spark 3.5.9, Python 3.11, Java 17, Deequ 2.0.21-spark-3.5). black and flake8 pass on the new files.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.