You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add ansi-safe casting
* update broken sql
* add unit tests
* add unit tests for actions.py ansi error check
* add 2 tests for general raise case in actions.py
* unit tests: fixes and cover general raise condition
* fix test_actions unit tests
* add code coverage
* update docs, rename tests
Copy file name to clipboardExpand all lines: docs/user_guide/data_quality_rules.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,7 @@ ADD CONSTRAINT action CHECK (
106
106
**Tip:**
107
107
- Match your expectation format to the rule type for correct validation.
108
108
- Use `row_dq` for per-row checks, `agg_dq` for summary statistics, and `query_dq` for advanced SQL-based checks.
109
+
- If running in Databricks serverless compute, expectations need to be ANSI compliant. See the ANSI Mode section of the [Serverless doc](serverless.md) for details.
109
110
110
111
111
112
Below are the details and examples for each rule type:
Copy file name to clipboardExpand all lines: docs/user_guide/serverless.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,3 +66,9 @@ def process_data():
66
66
result_df = process_data()
67
67
```
68
68
69
+
### IMPORTANT: ANSI Mode
70
+
When using serverless compute on Databricks, ANSI mode is **on by default**, which enforces stricter standards. If you use serverless compute you have two options:
71
+
- Turn ANSI mode off: set `spark.sql.ansi.enabled` to `false`
72
+
- Or, make sure your expectations are written in an ANSI-compliant way
73
+
- Use `try_cast` instead of `CAST`
74
+
- Please see Databricks documentation on ANSI mode for more guidance on other requirements for ANSI compliance
0 commit comments