Data Lineage & Impact
Why did this number change?

- Tablesproduct_eventsaccount_week_snapshotLinked in Trellis
- Viewweekly_active_customersChanged in a migrationLinked in Trellis
- DashboardCustomer activitytile shows 1,180Your BI tool
The comparison
Same week, same data, one different rule
| Input | Before | After |
|---|---|---|
| Reporting week | Same before and after: 14–20 Sep, UTC | |
| Source snapshot | Same before and after: account_week_snapshot | |
| Join | Same before and after: on account_id | |
| Count | Same before and after: distinct active accounts | |
| Plan at week end | paid or trial | paid only |
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: 1180It 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
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.
In your code
See which code reads, writes and calls each table.
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.
Nine ORMs
Calls through your ORM are linked too.
- 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