Open
Conversation
Co-authored-by: Isaac
Contributor
|
✅ 738/738 passed, 41 skipped, 4h43m32s total Running from acceptance #4562 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1092 +/- ##
===========================================
- Coverage 92.11% 72.64% -19.47%
===========================================
Files 101 101
Lines 9546 9557 +11
===========================================
- Hits 8793 6943 -1850
- Misses 753 2614 +1861
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…eholders
The custom-message field is renamed to message_expr and now accepts either a
Spark SQL expression string or a Spark Column object. The expression is
evaluated as-is — DQX no longer substitutes {rule_name}, {check_func_name}, or
{column_value} placeholders. Callers reference columns and identifiers directly
inside the expression.
- DQRule / DQForEachColRule: rename message -> message_expr (str | Column | None)
- to_dict serialises message_expr only when it is a string (Column is in-process)
- DQRuleManager._build_message_col simplified: F.expr(str) or use Column directly
- checks_serializer: read message_expr key from metadata, pass to constructors
- Unit tests rewritten for the new attribute name and Column variant
- Integration tests rewritten without placeholders; the existing
test_apply_checks_without_custom_message_unchanged is dropped (the Engine's
no-message default path is already covered by surrounding tests)
- Docs (quality_checks.mdx) rewritten to drop the placeholder section, add a
Column-based Python example, and annotate each example with the rendered
message string
Co-authored-by: Isaac
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.
Changes
Add an optional
messagecallable parameter toDQRule,DQRowRule,DQDatasetRule, andDQForEachColRulethat allows users to define custom check failure messages. The callable receives rule context (rule_name,check_func_name,check_func_args,column_value) and returns a Spark Column expression, enabling dynamic messages that can include column values.When
messageisNone(the default), the existing auto-generated message behavior is preserved. When provided, the custom message replaces the default message for failed rows while maintaining null/non-null semantics for passing rows.Linked issues
Resolves #958
Tests