Semantic Layer for the People and by the People

Marina Tosic23 Sep 2024

Problem

Teams that build a semantic layer, the governed set of models, dimensions and measures that business users query, face two goals that pull against each other. Simplifying the layer around one analytical area breaks consistency across areas. Forcing consistency makes the layer too complex to extend. As requirements grow, the repository fills with redundant code and no shared standards, which slows delivery of insights and sometimes lowers their quality.

Example from the article: the author builds semantic layers in Looker and reports that applying her repository blueprint gave the team faster development and easier troubleshooting.

Solution in brief

Give the repository a fixed shape. Split it into business-area folders and shared base folders, give every model, view and manifest file the same numbered section layout, and write definitions inside the code so a data dictionary and lineage graph come for free. Then improve the layer in a loop of iteration, correction and user education.

Questions this case answers
  • How to structure a governed metric and data-model repository so it stays simple and consistent while business requirements and the team keep growing
  • How to document metric definitions so business users can self-serve without asking the analyst who wrote them
  • How to structure a semantic layer repository so it stays simple and consistent as business needs grow
  • How to organize model, view and manifest files so several analysts can extend them without duplicating logic

Tools and methods

  • Semantic layer — governed models, dimensions and measures shared by technical and business users
  • Looker (LookML) — the tool the templates are written for: model, view and manifest files
  • dbt Core / Dataform — alternatives the author says the same structure applies to; dbt Core also supplies native data lineage
  • Data dictionary — business rules and terminology embedded in code files and shown to end users
  • Data lineage — graph from raw tables to presentation tables
Continue reading — it's free

Google or a one-time email code. No password.