BigQuery to ER Diagram
Turn a BigQuery query into a diagram. Paste a WITH … AS (…) CTE query and each CTE becomes a node, with edges inferred from the FROM / JOIN tables it reads — or paste plain CREATE TABLE DDL for a classic ER diagram.
How it works
- Copy a BigQuery
WITH/ CTE query, or yourCREATE TABLEDDL. - Paste it into the editor — BigQuery CTE queries are auto-detected.
- Each CTE becomes a node; columns come from its
SELECTlist, andFROM/JOINreferences (including backtickproject.dataset.table) are drawn as edges. - Arrange, hide nodes, then export PNG/SVG or convert to Mermaid/DBML.
Example
A BigQuery CTE query like this:
WITH customers AS ( SELECT id, email FROM `proj.shop.customers_raw` ), orders AS ( SELECT o.id, o.customer_id FROM `proj.shop.orders_raw` o ) SELECT * FROM orders
…renders customers and orders as nodes, linked to the base tables they read from. Try it with your own →
Guide
This page does something the others don't: it diagrams queries, not just schemas. Paste a BigQuery WITH … AS (…) statement and each CTE becomes a node on the canvas — its columns inferred from the SELECT list — with edges drawn to every table or CTE it reads from, including backtick-quoted project.dataset.table references. It's a dependency graph of your query, laid out and exportable.
For schema diagrams, grab real DDL from INFORMATION_SCHEMA:
SELECT ddl FROM `mydataset.INFORMATION_SCHEMA.TABLES` t JOIN `mydataset.INFORMATION_SCHEMA.TABLES_DDL_QUERY` …
— or simply bq show --schema --format=prettyjson per table and paste the CREATE TABLE form. Standard types (STRING, INT64, NUMERIC, STRUCT, ARRAY<STRUCT<…>>) render on the nodes.
Note that BigQuery doesn't enforce foreign keys — so a pure DDL paste gives you tables without edges. That's honest: use Infer links to draw the _id conventions, or diagram the CTE query that joins them to see the real relationships in use.
Why use it
- Private: everything runs in your browser — nothing is uploaded or stored on a server.
- CTE lineage — see how each
WITHstep depends on tables and other CTEs. - Interactive: drag tables, auto-arrange, hide noise, add notes, and manually link columns.
- Export a high-res PNG, vector SVG, or the schema as Mermaid / DBML / PlantUML code.
- Free & open source — no account, no sign-up.
FAQ
How do I visualize a BigQuery CTE query?
Paste your WITH … AS (…) query. Each CTE becomes a node, columns come from its SELECT list, and references to other CTEs or backtick-quoted project.dataset.table tables are drawn as edges.
Does it work with BigQuery CREATE TABLE DDL too?
Yes — paste standard CREATE TABLE statements and it draws a classic ER diagram with foreign-key relations.
Is my schema uploaded anywhere?
No. Everything runs locally in your browser — your schema is never uploaded to or stored on any server.
Is it free?
Yes. It is completely free and open source, with no account or sign-up required.