Length (min/max, whitespace)¶
string_length - Column-level - String
Validates string length bounds and optionally flags leading or trailing whitespace.
Parameters¶
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
min_length |
int | none | No | Optional minimum length (inclusive). |
max_length |
int | none | No | Optional maximum length (inclusive). |
fail_on_whitespace |
bool | False |
No | If true, fail when any non-null value has leading or trailing whitespace. |
threshold_percent |
float | 0.0 |
No | Fail if the percentage of violating rows exceeds this. |
YAML example¶
checks:
- name: example_string_length
check_type: string_length
table_name: schema.table
column_name: example_column
parameters:
fail_on_whitespace: false
threshold_percent: 0.0
See YAML check format for the full field reference.