Skip to content

Format / pattern (regex or LIKE)

string_regex - Column-level - String

Validates that non-null string values match a pattern, expressed as a regex or a SQL LIKE pattern.

Parameters

Parameter Type Default Required Description
pattern str none Yes The pattern every non-null value is expected to match.
pattern_type str 'like' No Whether pattern is a regular expression or a SQL LIKE pattern. LIKE works on every connector; regex depends on database support. One of: regex, like.
threshold_percent float 0.0 No Fail if the percentage of non-matching values exceeds this.

YAML example

checks:
  - name: example_string_regex
    check_type: string_regex
    table_name: schema.table
    column_name: example_column
    parameters:
      pattern: <pattern>
      pattern_type: like
      threshold_percent: 0.0

See YAML check format for the full field reference.