Check¶
Check is a table constraint that is a SQL expression to assert when writing out data.
Check is used for the following:
| Component | Name | Expression |
|---|---|---|
| IDENTITY Columns | Generated Column | EqualNullSafe |
| WriteIntoDelta | EXPRESSION(expression) | An Expression |
CharVarcharConstraint | __CHAR_VARCHAR_STRING_LENGTH_CHECK__ | |
| Table Constraints | delta.constraints.-prefixed key name (from the metadata configuration) without the prefix | The constraint text (from the metadata configuration) for the key |
| Column Invariants | The name of the delta.invariants metadata of a column | The expression of the delta.invariants metadata of a column |
Creating Instance¶
Check takes the following to be created:
- Name
-
Expression(Spark SQL)
Check is created when:
ColumnWithDefaultExprUtilsis requested to addDefaultExprsOrReturnConstraintsWriteIntoDeltais requested to extractConstraintsCharVarcharConstraintis requested tostringConstraintsConstraintsis requested to getCheckConstraintsInvariantsis requested to getFromSchema