Skip to main content

FinePrint

Read the fine print of your metrics — a decompiler for your dashboards.

Source & issues · 中文文档 (Chinese docs)

FinePrint recovers, from your dbt project's compiled artifacts, the caliber a metric actually executes — its true definition, in the small print of the SQL.

It can tell you:

  • how a metric's formula is computed;
  • where the numerator and the denominator each come from;
  • which filters, time windows and dedup rules shape the result;
  • which upstream columns the metric depends on;
  • whether a SQL change silently changed the metric's meaning.

FinePrint never connects to your database and never reads your business data.

Example

The dashboard says the refund rate is 30%. Finance computes 80%.

Walking the SQL chain reveals what the dashboard actually counts:

  • only refunds issued within 14 days of payment;
  • only the latest record of each refund;
  • test orders excluded;
  • paid orders only;
  • attributed to the payment date, not the refund date.

FinePrint unfolds those conditions, buried across multiple layers of SQL, directly:

$ fineprint trace --project . dm_refund_rate_1d.refund_rate

◎ dm.dm_refund_rate_1d.refund_rate
│  formula: SUM(refund_amount) / SUM(amount)
│
├─ numerator
│  ├─ refunded_at <= paid_at + INTERVAL '14' DAY
│  └─ rn = 1
│
├─ denominator
│  └─ from stg_orders
│
└─ shared by both sides
   ├─ status = 'paid'
   └─ is_test = 0

This caliber tree is derived from the SQL by a deterministic program — no LLM involved.

Try it yourself in 10 minutes with the bundled example project — pre-built dbt artifacts included, no dbt install and no database needed.

Core capabilities

Metric caliber tracing

Column-level lineage built on sqlglot, unfolding across models:

  • the formula;
  • numerator / denominator;
  • filter conditions;
  • time windows;
  • column dependencies.
fineprint graph --project .
fineprint trace --project . model.column

Metric caliber cards

FinePrint runs two independent channels:

  • a deterministic engine deriving technical facts from the SQL AST;
  • an LLM reader producing a business-readable narrative.

The two are cross-validated before a traceable caliber card is published.

fineprint synth --project .
fineprint report --project .

synth sends the relevant compiled SQL and column documentation to the LLM endpoint you configure; database credentials and warehouse data are never sent. Every other command runs entirely locally.

Caliber drift detection

Detects:

  • formula changes;
  • filter changes;
  • time-window changes;
  • source-column and dependency changes;
  • the downstream metrics affected.
fineprint drift --project .

--strict makes it a CI gate.

Accuracy

The deterministic engine has been probed exhaustively on:

  • 5 public dbt projects;
  • 3 SQL dialects;
  • 1,364 models;
  • 34,499 columns.

Provable cross-layer formula coverage: 99.73%. (Coverage measures formula provability — it is not the same thing as business-caliber accuracy.)

A hand-built suite of 14 classic caliber traps serves as regression: currently 14 / 14.

Install

pip install fineprint

Quick start

cd your-dbt-project

dbt compile
dbt docs generate

fineprint init --project .
fineprint graph --project .
fineprint trace --project . model.column

To generate caliber cards:

export FINEPRINT_LLM_BASE_URL=https://api.openai.com/v1
export FINEPRINT_LLM_API_KEY=sk-...
export FINEPRINT_LLM_MODEL=gpt-4.1-mini

fineprint synth --project .
fineprint report --project .

After changing SQL:

dbt compile
fineprint graph --project .
fineprint drift --project .

graph, trace and drift never call an LLM.

Python API

Since 0.9, a minimal public surface for notebooks, BI plugins and orchestration:

import fineprint

fineprint.build_graph("path/to/dbt_project")
print(fineprint.trace("path/to/dbt_project", "dm_refund_rate_1d.refund_rate"))
batch = fineprint.cards("path/to/dbt_project")   # the card JSON is the contract (schema_version frozen)

Current boundaries

What FinePrint recovers is:

the caliber your code actually executes.

It cannot judge on its own whether the SQL matches the business's original intent.

The current stable release targets dbt projects.

Documentation

License: Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fineprint-0.9.4.tar.gz (100.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fineprint-0.9.4-py3-none-any.whl (112.4 kB view details)

Uploaded Python 3

File details

Details for the file fineprint-0.9.4.tar.gz.

File metadata

  • Download URL: fineprint-0.9.4.tar.gz
  • Upload date:
  • Size: 100.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for fineprint-0.9.4.tar.gz
Algorithm Hash digest
SHA256 9c38d77f6feba70cb31c65528287fe8752bad58282d211f9f3e944b3641d7e41
MD5 a9fb20a7f74ef053bbb1fb6a12f4f84d
BLAKE2b-256 d157f4c051e3be0579298965ea55499cc2687cb197e07e23ea4be037d44626ad

See more details on using hashes here.

File details

Details for the file fineprint-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: fineprint-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 112.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for fineprint-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e6b6df8242c1ee897ff06b755ac418add11f9e3332cfea23f9d39510a9c9edac
MD5 99439221d4eab5ae1e4d0c151db01419
BLAKE2b-256 a3c893104a6d1e4f6ee9070a8a426375c7a59c299e94126704ead6cf30c88705

See more details on using hashes here.

Release history Release notifications | RSS feed

0.9.8

2 files

0.9.7

2 files

0.9.6

2 files

0.9.5

2 files

This release

0.9.4 This release

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.10

2 files

0.8.9

2 files

0.8.8

2 files

0.8.7

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page