Within 90 seconds of connecting your warehouse, Saemi generates a wiki page with an Entity Relationship Diagram (ERD) — the top 12 tables in your schema, drawn with their primary keys, foreign keys, and join arrows.
It's the fastest way to understand a warehouse you've inherited, and the fastest way to brief a new hire on yours.
How Saemi picks the tables
The ERD shows your 12 most-referenced tables — specifically, the ones with the highest count of inbound foreign-key references. The intuition: a users table that 30 other tables point to is more central than an audit_log that no one references. The ERD foregrounds the joins your team actually uses.
You can rebuild the ERD anytime (settings → "Re-scan schema") if you've added new tables or renamed columns.
Reading the diagram
Each entity card shows:
- Table name (clickable — jumps to the table's chat context)
- Primary key(s) (highlighted)
- Foreign keys (with → pointing at the referenced table)
- Selected columns (the ones with the most query-context value — IDs, names, dates, status fields)
Arrows show foreign-key relationships. Hover an arrow to see the join clause Saemi infers.
Use the ERD in chat
In any chat, type @ followed by a table name to pull that table's ERD context into the answer. Saemi uses the relationships to pick the right joins automatically — you don't need to write JOIN x ON x.user_id = u.id by hand.
Example:
Code
@orders @users — what's the average order value by user signup channel last 30 days?
Saemi knows orders.user_id joins to users.id (from the ERD), knows users.acquisition_channel exists, and writes the join + aggregate without prompting for the join clause.
Share the ERD as a wiki
The auto-generated ERD lives at /wiki/<id>/ and is editable like any wiki page. Add prose annotations ("the orders.status field uses our internal taxonomy — see the legend below"), screenshots, or links to dashboards. The page is workspace-visible by default — share the URL with anyone on your team.
What if Saemi misses a table I care about?
Two paths:
- Manual add to the diagram — open the wiki page and edit. The ERD is a regular wiki page, so you can extend it freely.
- Force re-scan with explicit table list — settings → "Custom table priority" lets you pin tables that should always appear regardless of FK ranking.
What if my warehouse has no foreign keys?
Plenty of analytics warehouses lack declared FKs (especially data-lake-style ones). In that case Saemi falls back to name-pattern inference — if a column is named user_id and there's a users table, Saemi treats it as a foreign-key relationship for ERD purposes. The inference is conservative; it won't invent joins from ambiguous names.