Trellis

Data Lineage & Impact

Why did this number change?

Weekly active customers fell from 1,240 to 1,180 for the same week. Nobody lost sixty customers. The number comes from a view in your database. Connect that database and Trellis follows the view to the tables it selects from, so you can inspect the rule that changed.
An analyst and an engineer tracing a figure on a chart back to a schema sketch.
Illustrative team scene · AI-generated
  1. Tablesproduct_eventsaccount_week_snapshotLinked in Trellis
  2. Viewweekly_active_customersChanged in a migrationLinked in Trellis
  3. DashboardCustomer activitytile shows 1,180Your BI tool
A synthetic example: the tables, view and figures are illustrative. Trellis reads the database’s definitions, not its rows; the dashboard is your BI tool’s.

The comparison

Same week, same data, one different rule

Before calling it churn, check everything that could have moved. Four inputs held still. One didn’t.
The two calculations compared
InputBeforeAfter
Reporting weekSame before and after: 14–20 Sep, UTC
Source snapshotSame before and after: account_week_snapshot
JoinSame before and after: on account_id
CountSame before and after: distinct active accounts
Plan at week endpaid or trialpaid only
1,240 active accounts, split by plan. The revised view drops the 60 trial accounts. That accounts for the whole difference.

View weekly_active_customers, before and after (from the migration’s pull request)

- WHERE a.plan_at_week_end IN ('paid', 'trial')+ WHERE a.plan_at_week_end = 'paid'
Read the full revised view
CREATE OR REPLACE VIEW weekly_active_customers AS
SELECT a.week_start,
       COUNT(DISTINCT e.account_id) AS customers
FROM product_events e
JOIN account_week_snapshot a
  ON a.account_id = e.account_id
 AND e.occurred_at >= a.week_start
 AND e.occurred_at <  a.week_start + INTERVAL '7 days'
WHERE a.plan_at_week_end = 'paid'
GROUP BY a.week_start;
-- week of 2026-09-14: 1180

It uses each account’s plan at the week’s close, not today’s plan, so the historical answer can’t drift.

Where it is read

Put the explanation where people read the number

Your BI tool draws the tile, and Trellis does not replace it. Wherever the number is read, attach the definition and the change to it.

Customer activityWeek of 14 Sep

Weekly active customers

1,180

Restated from 1,240 after excluding 60 trial accounts. Same week, same snapshot.

DefinitionPaid accounts with at least one product event in the UTC week.

Viewweekly_active_customers, paid-only filter.

Still to decideRestate earlier weeks before anyone compares the trend.

Synthetic example. The tile belongs to your BI tool; Trellis does not draw it.
Coming soon

In your code

See which code reads, writes and calls each table.

Trellis finds the SQL in your application code, in all the languages Trellis reads, and the calls your code makes through any of the nine supported ORMs. It links each function to the tables, views and stored procedures it uses. Ask your agent who writes a table, and get the function, file and line, alongside what the database itself does with it.

Coming soon: linking your application code and ORM calls to the tables they use arrives in an upcoming Trellis release. No date is promised.

Links come from the SQL in your code, including SQL constants shared between files, and from calls through nine ORMs: Prisma, Sequelize, TypeORM, Django, SQLAlchemy, ActiveRecord, Entity Framework Core, JPA with Hibernate, and GORM. Other ORMs and standalone query builders are not linked, and an ORM call links to its model’s own table, not to related tables. On a shared team graph, code and a database registered as separate corpora are linked when you read them; within one corpus they are linked at ingest. Each link says how it was found—a full statement, a partial one, a shared constant or an ORM call—so you can filter for certainty.

Coming soon

Nine ORMs

Calls through your ORM are linked too.

Trellis reads which model an ORM call uses and links the function to that model’s table, following the ORM’s own naming rules. Finding, counting and loading read the table; creating, updating, deleting and saving write it.
TypeScript and JavaScript
Prisma 7
Sequelize 6
TypeORM 0.3 and 1.x
Python
Django 5
SQLAlchemy 1.x and 2.x, including Flask-SQLAlchemy
Ruby
ActiveRecord 7 and 8
C#
Entity Framework Core 8 and 9
Java and Kotlin
JPA with Hibernate 6, and Spring Data JPA
Go
GORM v2

Try it

Bring a metric nobody can explain.

In an evaluation, connect your database and see how Trellis links your views to the tables they read.