Schema checks
Use a SodaCL schema check to validate column presence, absence, or position in a table, or the type of data column contains.
checks for dim_product:
- schema:
name: Confirm that required columns are present
warn:
when required column missing: [weight_unit_measure_code, product_subcategory_key, made_up_column]
fail:
when required column missing:
- product_key
- product_alternate_key
- schema:
warn:
when forbidden column present: [credit_card]
when wrong column type:
standard_cost: money
fail:
when forbidden column present: [pii*]
when wrong column type:
reorder_point: smallint
- schema:
name: Columns out of order
warn:
when wrong column index:
style: 1
fail:
when wrong column index:
model_name: 22
- schema:
name: Any schema changes
warn:
when schema changes: anyDefine schema checks
Define schema evolution checks

Optional check configurations
Supported
Configuration
Documentation
Example with check name
Example with alert configuration
Example with quotes
Example with wildcards
Example with for each
Example with dataset filter
List of validation keys
Validation key
Values
Expect one check result
Example: Detect PII
Go further
Last updated
Was this helpful?
