Skip to content

Precision/scale (decimal)

numeric_precision_scale - Column-level - Numeric

Validates that decimal values fit within an expected precision and scale.

Parameters

Parameter Type Default Required Description
precision int 18 No Total number of digits allowed, e.g. 10 for DECIMAL(10,2).
scale int 0 No Number of digits allowed after the decimal point, e.g. 2 for DECIMAL(10,2).
threshold_percent float 0.0 No Fail if the percentage of violating rows exceeds this.

YAML example

checks:
  - name: example_numeric_precision_scale
    check_type: numeric_precision_scale
    table_name: schema.table
    column_name: example_column
    parameters:
      precision: 18
      scale: 0
      threshold_percent: 0.0

See YAML check format for the full field reference.