Skip to main content

quality

Answers "is this file fit for use?" in one report: every field's empty values, distinct values, top values, type and type conformance; differences from an expected schema; rule violations by severity; and a pass/fail verdict from your thresholds. The command exits with 1 when a threshold fails (0 otherwise), so the report doubles as a data contract in CI.

undatum quality data.csv
undatum quality data.csv --rules rules.yml -o report.html
undatum quality data.csv --json
undatum quality deliveries/2026-10.csv --schema expected.json --rules rules.yml \
--thresholds quality.yml -o report.html

The report format follows --format-out / -O (markdown, html, json) or the --output extension; Markdown goes to stdout by default. HTML is a single file without external resources. --json prints the undatum.quality/1 document with summary, fields, schema_check, violations and verdict.

Thresholds​

# quality.yml
min_rows: 1000
max_null_rate:
email: 0.01 # at most 1% empty e-mail addresses
"*": 0.2 # every other field
min_type_conformance:
amount: 0.99 # 99% of amounts are numbers
max_error_violations: 0
max_warning_violations: 50
schema: additive # strict: no added, removed or retyped fields; additive: new fields allowed
KeyChecks
min_rows, max_rowsnumber of records
max_null_rateshare of empty values ("", n/a, null, - count as empty); a number for every field or a mapping with * as the default
min_type_conformanceshare of values that fit the field's type (from --schema, else the type most values have)
max_error_violations, max_warning_violationsrule violations from --rules
schemastrict or additive comparison with --schema

Unknown keys and out-of-range values stop the run with exit code 2. A threshold for a field the file does not have fails.

--schema takes undatum schema FILE --json output, a JSON Schema, a Frictionless table schema or a reference data file (see schema drift); --rules takes a rule file.

In CI​

# .github/workflows/data.yml
- name: Check the delivery
run: |
pip install undatum
undatum quality data/delivery.csv --rules rules.yml --thresholds quality.yml -o report.html
- name: Keep the report
if: always()
uses: actions/upload-artifact@v4
with:
name: quality-report
path: report.html

From Python, Dataset.read("data.csv").quality(rules="rules.yml") returns the same report as a dict. In a pipeline, use command: quality.

Reference​

Reads: any readable format · Writes: a Markdown, HTML or JSON report · Memory: DuckDB profiles CSV/JSON/Parquet out of core; other formats are loaded into DuckDB · Engines: python

undatum quality [OPTIONS] INPUT_FILE
ArgumentDescription
INPUT_FILEPath to input file. (required)
OptionDescriptionDefault
--rules TEXTValidation rule file (YAML/JSON) to apply.
--schema TEXTExpected schema: undatum schema --json output, JSON Schema, Frictionless schema or a reference data file.
--thresholds TEXTThresholds file (YAML/JSON); a failed one exits with 1.
-O, --format-out TEXTReport format: markdown (default), html, json.
-o, --output TEXTWrite the report here (format from the extension).
-F, --format-in TEXTOverride input format detection.
--table, --sheet TEXTTable or sheet name for multi-table sources (Excel, SQLite, lakehouse).
--jsonPrint the result as one JSON document (same as --format-out json).

See also shared options.