Validation Checks#
The DQ Validator module provides ten comprehensive validation check types.
Note
This section provides an overview. Detailed API documentation with all parameters is available in the API Reference.
Available Checks#
LengthCheck - Validates string length
ValidValuesCheck - Validates against allowed values
ComparisonCheck - Compares values using operators
CaseCheck - Validates character case
CompletenessCheck - Validates non-null values
RangeCheck - Validates numeric ranges
RegexCheck - Validates regex patterns
FormatCheck - Validates value formats
DataTypeCheck - Validates data types
CELCheck - Validates using CEL (Common Expression Language) expressions
CEL Expression Check#
The CELCheck enables custom validation logic using Google’s Common Expression Language (CEL). This powerful check type allows you to:
Define complex validation rules without writing Python code
Reference multiple columns in a single expression
Use conditional logic for context-dependent validation
Perform string operations, arithmetic, and logical comparisons
Quick Example#
from wxdi.dq_validator import CELCheck
# Simple value check
check = CELCheck('value > 0')
# Multi-column comparison
check = CELCheck('value > record.min_salary')
# Conditional logic
check = CELCheck('record.age > 40 ? value >= 80000 : value >= 50000')
For comprehensive documentation on CEL expressions, see CEL Expression Validation.
For detailed usage examples and API documentation, see the API Reference.