Skip to content

Required nodes/keys present

json_xml_required_keys - Column-level - JSON and XML

Validates that required keys or nodes are present in every document.

Parameters

Parameter Type Default Required Description
required_keys list none Yes List of key paths that must be present, e.g. ['id', 'name', 'address.city'].
format str 'json' No Whether the column holds JSON or XML documents. One of: json, xml.
threshold_percent float 0.0 No Fail if the percentage of rows missing any key exceeds this.

YAML example

checks:
  - name: example_json_xml_required_keys
    check_type: json_xml_required_keys
    table_name: schema.table
    column_name: example_column
    parameters:
      required_keys: <required_keys>
      format: json
      threshold_percent: 0.0

See YAML check format for the full field reference.