At a glance
Loading the model…
Raw file: data/sample-model.json. It is generated by tools/build_sample_model.py in the repo, which is the easiest place to read the whole model top to bottom.
Tables by layer
The JSON shape
Six top-level keys. Only layers, tables and columnLineage are required; the rest switch on extra views.
| Key | What it holds | Used by |
|---|---|---|
layers | id, name, order, description. Ids map to the layer colors: source, bronze, silver, gold, semantic, report. | Everything |
tables | id, layer, schema, name, kind (source, raw, entity, fact, dimension, semantic-table, measure-table, report), optional grain, scd, fact_type, and columns with name, type, optional key (PK, FK, SK, BK, DD), hidden, expression. | Everything |
columnLineage | Edges {from, to, transform} between column ids, where a column id is <table id>.<column name>. Table lineage is derived from these. | Lineage flow, column tracer, engine cake, data anatomy, semantic engine |
relationships | Semantic-model relationships: fact, from, dim, to, cardinality (*:1 or *:*), active, optional role and note. | Star schema, bus matrix, semantic engine |
hierarchies | Drill paths in the semantic model: table, name and ordered levels (column names, top first). | Semantic engine |
engine | The analytic engine layers, top to bottom, with what each does. | Engine cake |
pipelineConfig | Example rows of a metadata-driven load control table. | This page |
Swapping in your own model
Each piece of the JSON has a natural source in a real platform. None of these exports needs anything exotic:
- Tables and columns:
INFORMATION_SCHEMA.COLUMNSfrom the Warehouse and the lakehouse SQL analytics endpoint, one query per layer. - Bronze and silver lineage: the pipeline config table already says which source object lands in which target; column edges are pass-through by default, then hand-annotate the renames and derivations.
- Gold lineage: parse the load stored procedures, or keep a small mapping table next to them. A mapping table you maintain beats a parser you don't.
- Semantic layer and measures: the TMDL or
model.bimexport of the semantic model, orINFO.TABLES(),INFO.COLUMNS(),INFO.RELATIONSHIPS()andINFO.MEASURES()DAX functions run from a notebook with semantic link. - Report visuals: the report definition (PBIR) lists each visual's fields and measures.
A single notebook can do all of it: query the SQL endpoints for columns, read the control table for bronze, call semantic link for the model, and write one JSON file to a lakehouse Files folder. Commit that file here and every exploration redraws with your model.
Pipeline config sample
The control rows that would load this model in a metadata-driven pipeline. See metadata-driven pipelines for the pattern.