{% extends "main.html" %} {#- The landing page: a hero with the claim ledger, then docs/index.md as the body. The ledger rows are real outcomes of the Getting started shop database; the test tests/conformance/test_docs_examples.py re-checks every row against it. -#} {% block extrahead %} {{ super() }} {% endblock %} {% block tabs %} {{ super() }}

Every claim about your warehouse, checked against every row.

FactLang is a small language for facts about data: joins, nulls, counts, allowed values, freshness. Each line compiles to read-only SQL for your warehouse and comes back as a verdict, with the measured numbers and the exact query as evidence.

pip install factlang  no dependencies in the core
JOIN orders.customer_id -> customers.id CARD N:1 MATCH >=99%
fail match_rate 0.9765625 < 0.99
NULLS customers.email RATE <=5%
pass null_rate 0.04 <= 0.05
VALUES orders.status IN ['paid', 'open', 'shipped']
fail undeclared_rows 200 != 0
COUNT orders VALUE ==1400 WHERE status = 'paid'
pass value 1400 == 1400
SUM orders.amount VALUE ==209000 TOLERANCE 1%
pass value 209000 satisfies == 209000 (band 2090)
AVG orders.amount VALUE ==100 WHERE status = 'lost'
no data value was not measured
Real outcomes on the shop database from Getting started, measured on DuckDB.
{% endblock %}