Skip to content

Cross-field math

cross_field_math - Column-level - Common column checks

Validates that a numeric column equals a formula computed over other columns in the same row.

Parameters

Parameter Type Default Required Description
result_column str none No Column that should equal the formula. Defaults to the check's own column.
expression_type str 'product' No How to combine the operand columns. One of: product, sum, difference, ratio.
left_column str none Yes First operand column.
right_column str none No Second operand column (for product, difference, and ratio).
extra_columns list [] No For sum: additional column names to sum.
tolerance float 0.0 No Absolute tolerance allowed between the formula and the result column.
threshold_percent float 0.0 No Fail if the percentage of rows outside tolerance exceeds this.

YAML example

checks:
  - name: example_cross_field_math
    check_type: cross_field_math
    table_name: schema.table
    column_name: example_column
    parameters:
      expression_type: product
      left_column: <left_column>
      extra_columns: []
      tolerance: 0.0
      threshold_percent: 0.0

See YAML check format for the full field reference.