Metabase metrics and the Library: when a semantic layer belongs in your self-hosted analytics
When several teams report different numbers for the same KPI, the problem is rarely the data itself. It is that each analyst rebuilds the calculation with a slightly different filter, join or date rule. Metabase metrics are the official way to calculate a number: each one names a data source, a formula and the dimensions people can break out and filter by. The Library, managed in Data Studio, is a centrally managed set of curated content and shared definitions, so tables, metrics and glossary entries that the organization has approved can be found in one place rather than rediscovered in saved questions.
A semantic layer belongs in your self-hosted analytics once more than one team pulls the same measure into dashboards, or once a finance, risk or compliance reviewer needs to know which definition a figure came from. It is less useful for a single analyst exploring a new dataset, where ad hoc questions are the right tool. Before you commit, confirm which Library features your plan includes, because the Metabase documentation notes that some of them need Pro or Enterprise. Check this against the Metabase pricing page and your own requirements, since the open source edition may cover metric definitions without covering the curation and approval workflow you expect.
Decide, before building, who owns each official metric, who may publish changes, and where the authoritative definition should live. Agree whether the metric is defined in Metabase or upstream in your transformation tooling, and document the chosen source of truth so that a change to a formula triggers review by its owner. Ask your implementation partner to map existing dashboards to candidate metrics and to flag every place where two teams compute the same KPI differently. Those conflicts, not the tooling, usually set the scope and effort of this work.
Where should KPI definitions live: Metabase, dbt or the warehouse?
A Metabase metric defines the official way to calculate a number, with a data source, a formula and the dimensions people can break out and filter by. The definition is authored inside Metabase and shared through the Library, so analysts and business users who already work in Metabase can edit and reuse it without leaving the tool. This keeps the definition close to the dashboards and questions that depend on it, which suits teams whose analytics lives mainly in Metabase.
- Who edits it: Analysts or data owners with appropriate permissions in the Metabase instance, usually outside the data pipeline repository.
- Where it is versioned: Inside the Metabase application database. Version history depends on your setup, so confirm what Metabase records and how you would restore a prior definition.
- Who consumes it: Questions, dashboards and Library content in that Metabase instance, and any embedded content built on it.
- Multiple tools: Other BI tools or applications do not read Metabase metrics, so a second dashboard tool would need its own copy of the logic.
- Recurring effort: Ownership of Library curation and metric reviews continues after launch.
Confirm with your team whether reviews of metric changes happen in a tool your auditors can inspect.
When a team already builds transformations in dbt, KPI logic often lives in dbt models and metrics next to the tables it depends on. Definitions are written as code, reviewed through pull requests and tested with the same pipeline as the rest of the warehouse models. Metabase can then query the resulting models, so the number is calculated once upstream and displayed consistently. This works well when data engineers own the definitions.
- Who edits it: Analytics engineers and data engineers, through code review in the dbt project.
- Where it is versioned: In the dbt project's Git repository, with the history and approvals your engineering process already uses.
- Who consumes it: Any tool that reads the warehouse models or dbt's metric definitions, including Metabase, provided the tool reads them directly.
- Multiple tools: Several tools can share one definition, but each must be wired to the dbt output, and the metric logic needs to be expressed in a form those tools support.
- Recurring effort: Model maintenance, test runs and the pipeline that keeps models current.
Check whether your dbt version and the metric features you need are supported in the tools your business teams use.
A warehouse view places the KPI calculation directly in the database as a SQL view or similar object. Any client with read access to the view sees the same logic, which makes the warehouse the most tool-neutral home. The trade-off is that business logic is written in SQL outside any modeling framework, so changes usually depend on database administrators or engineers who maintain the schema.
- Who edits it: Database engineers or data engineers with schema change rights.
- Where it is versioned: Depends on the team. Many teams keep view scripts in Git, but some edit views directly in the database, so confirm the process before relying on it.
- Who consumes it: Any client with access to the view, including Metabase, other BI tools, notebooks and scheduled jobs.
- Multiple tools: This is the strongest option for sharing one number across tools, because no tool re-implements the logic.
- Recurring effort: Permission management on views, performance tuning and changes when source tables move.
Confirm how your database's permissions model applies to views, since access to underlying tables can affect what each consumer sees.
The right home depends less on which tool is more capable and more on who owns the definition and which tools already exist. A team with a mature dbt project may keep KPIs there and point Metabase at the outputs. A team whose analysts maintain most definitions and who work mainly in Metabase may keep them in the Library. Many organizations use more than one home, which creates the main risk: two places that calculate the same number differently.
- Ownership first: Decide who is accountable for each official number before choosing the tool.
- Existing tooling: Prefer the home that matches the version control, review and test processes you already audit.
- Shared numbers: If several tools need one figure, a warehouse view or upstream model is often easier to keep consistent.
- Single source rule: Record which home is authoritative for each KPI and where downstream copies are allowed.
- Licensing check: Some Library and governance features need Pro or Enterprise plans, so confirm which features your chosen edition includes.
Write down the decision for each KPI and review it when a new tool or team joins.
How to set up metrics and the Library on a self-hosted instance
This sequence takes a self-hosted Metabase from a confirmed plan and feature set to a small, owned set of official metrics that curated Library content and dashboards draw from. Each step ends with a check you can run before moving on.
Confirm plan and feature access
Before building anything, confirm which Metabase plan your instance runs and whether the Library and the features you need are included. The Metabase pricing page lists Open Source, Starter, Pro and Enterprise, and some Library features require Pro or Enterprise, so check the Library documentation against your plan. Record the edition and version in your change log. Done when an admin can open the Library section in Data Studio and you have written down which features are unavailable on your plan.
Pick three to five KPIs with named owners
Work with finance, operations or product leads to choose the handful of numbers that executives and teams already argue about, such as active customers or on-time delivery. Give each KPI one accountable owner who approves its definition and answers questions about it. Keep the list short, because every metric needs ongoing review. Done when each KPI has a written name, a one-sentence business definition, and an owner who has agreed to it in writing.
Confirm the source data and its tests
For each KPI, identify the warehouse table or model that holds the underlying facts, and confirm the database connection in Metabase syncs cleanly. Check row counts, null rates and date ranges against a trusted report the owner already uses. Agree on which timestamp and status fields count. Done when the owner signs off that a reconciliation query in Metabase matches the number from the existing report for a period they choose.
Build the metrics on the tested source
Create each metric from the tested source, entering its data source, formula and the dimensions people should be able to break it out by, such as region or product line. Write the description and the owner into the metric so future users see the context. Keep formulas in one place and avoid duplicate metrics with near-identical names. Done when each metric returns the reconciled value in a preview, and filtering it by each agreed dimension gives results the owner accepts.
Curate tables and glossary entries in the Library
In the Library, add the tables and metrics your teams should use, mark the authoritative ones, and write glossary entries for the business terms behind them, such as what counts as an active customer. Link each entry to its owner so questions route to someone accountable. Remove or hide stale duplicates so people are not guided toward them. Done when a non-admin test user can find each official metric and term from the Library and sees the owner and definition on the entry.
Restrict editing rights
Limit who can edit metrics, Library content and the collections that hold them to the owners and a small group of data administrators. Keep read access broad for analysts and business users, and confirm this with the group and collection permission settings described in your permissions design. Review the admin group membership before go-live. Done when a test account in a read-only group can view the official content but receives a permission error when it tries to edit a metric or Library entry.
Verify saved questions and dashboards pick up the metric
Build a saved question and a dashboard that use the official metrics, then change a test value in the source or temporarily adjust a filter on a non-production copy. Confirm the saved question and dashboard reflect the metric definition rather than a copied formula, and that the owner can trace the number back to the metric. Note the result in the change record. Done when a metric edit made by an owner is visible in every dependent saved question and dashboard after refresh, and the owner signs off on the results.
Which Library and metric options fit which governance model
This table compares common ways to set up metrics and the Library, from open governance to tightly controlled definitions, and the trade-off each one carries. Read each row against your team size, how many people change definitions, and whether an auditor or data owner must sign off on official numbers. Confirm any Library feature that needs Pro or Enterprise on the pricing page before you commit to a model.
| Governance option | When it fits | Trade-off | What to confirm |
|---|---|---|---|
| Metrics created by any analyst, no curation | Small team with one data owner who reviews questions directly | Duplicate or conflicting definitions appear quickly as usage grows | Whether anyone is accountable for reconciling conflicting metrics |
| Metrics limited to a named data team | Official revenue, customer or risk numbers that need a single owner | Analysts wait for the data team to publish changes, which slows delivery | Who approves edits and how requests are logged |
| Curated Library tables and metrics marked authoritative | Organizations that want business users to find trusted content first | Someone must keep curated items current, or they go stale | Which Library features are included in your plan on the Metabase pricing page |
| Glossary entries alongside metrics | Teams where terms such as active customer mean different things by department | Glossary text is documentation, so it does not enforce how a calculation runs | Who owns each term and how often definitions are reviewed |
| Metabase metrics only | Single warehouse, modest number of official calculations, Metabase as the main consumption layer | Metric logic lives in Metabase, so other tools and pipelines will not reuse it | Whether downstream tools need the same definitions |
| Metabase metrics alongside dbt models | Warehouse models already hold business logic and tests, and Metabase should reuse them | Two places to change definitions, so the review process must cover both | Which model is the source of truth and how changes flow between them |
| Definitions kept only in the warehouse or dbt | Several BI tools read the same models and consistency across them matters most | Business users cannot see or adjust metric logic inside Metabase | Whether your team will maintain a semantic model outside Metabase |
How metrics, the Library and source databases fit together
The diagram starts at source databases and optional dbt models, which the Metabase instance queries through its connections. Metrics hold the official calculation, with a data source, a formula and the dimensions people can filter by. Owners approve metrics and curated Library entries before they reach saved questions, dashboards and embedded views. The application database stores these definitions, so check who can edit them and back that database up.
Definitions flow from source data through owner approval into the content people consume.
Access, ownership and change risks for shared metrics
A shared metric is only as trustworthy as the access, review and ownership around it. The four risks below are the ones that most often surface after a Metabase metrics and Library rollout, and each has a control you can put in place before people rely on the numbers.
Metrics exposing restricted data
A metric inherits the data its underlying source table or query can reach, so a group that can see a metric may see figures derived from rows or columns it should not view. Check which groups can read each metric's source and which collections hold it. Row and column permissions, which restrict visibility inside a table, need a Pro or Enterprise plan, so on Open Source you must restrict the underlying data by database access or a separate, narrower source instead.
Metrics docsSilent changes to board numbers
Editing a metric's formula or filter changes every dashboard and question built on it, often without anyone noticing that a board figure moved. Before a metric backs a board or regulatory report, require a documented review of each formula change and keep a record of the previous definition. Restricting who can edit official metrics to a named owner group is the simplest control, and it is available on every plan.
Duplicate and stale definitions
When teams build their own versions of the same calculation, the organization ends up with three revenue figures that disagree. Search the instance for existing metrics and saved questions before approving a new one, and mark the official metric in the Library so people choose it by default. Old definitions that nobody maintains should be archived on a schedule so they stop appearing in search results.
Unclear ownership of definitions
A metric without a named owner has no one to answer when a number looks wrong or a source table changes. Assign an accountable owner and a backup for every official metric and Library table, and record the business definition next to the formula so reviewers know what the number is meant to mean. Confirm with your Metabase administrators how ownership is recorded in your instance, since this is a process decision rather than a setting.
Definitions drifting from warehouse logic
If the same calculation also lives in dbt models or warehouse views, a change in one place can leave the other out of step. Decide which system is the source of truth for each metric, and document where the Metabase definition must be updated when the upstream logic changes. Test the two against each other after every change to the source model.
Keeping metrics stable through upgrades and migrations
Metrics stay stable through an upgrade only if the application database that stores them is backed up and restored correctly, so treat that database as the place where your official calculations live. Metabase stores metric definitions, along with the Library collections and content that reference them, in its application database, not in your warehouse. An upgrade runs the application database migrations automatically, and a migration that goes wrong can change or lose content that people rely on. Before any upgrade, take a backup of the application database and confirm you can restore it. The Metabase upgrading docs recommend this first step and also recommend reducing a cluster to a single node for major upgrades because of a migration lock.
If your instance is older than version 40, the documented rule is to upgrade release by release rather than jumping straight to the newest build. Plan that path before the change window opens, and confirm the target versions against the Metabase version support page, which lists end-of-life dates for LTS and non-LTS releases. Rollback is done by restoring the pre-upgrade application database backup, which the docs recommend, or by running the migrate down command with the newer JAR. Decide in advance which path you will use, and store the backup where the restore team can reach it. A rollback that depends on a backup you cannot restore is not a rollback.
After each upgrade or migration, rerun a fixed set of metric checks before users return. Choose a small list of official metrics, record the expected result for a known date range from the pre-upgrade instance, and compare the post-upgrade values, the dimensions and the filters. Confirm the metric still points to the intended data source, and check that Library entries and glossary links still resolve. Who signs off these results should be written into the change plan, and the same checks should run again after any later migration, including a move from the H2 application database to PostgreSQL. Ask your Metabase partner to show how they will capture the baseline values before the change.
Limits to confirm in your environment before you commit
Metrics and the Library only work as a shared semantic layer if the features, sources and permissions you depend on are available on your plan and behave as you expect. The cards below list the checks to run with Metabase or in a test instance before you standardize definitions across teams.
Library features by plan
The Library, managed in Data Studio, provides curated content and shared definitions, but some of its features need Pro or Enterprise. Ask Metabase which Library capabilities your plan includes, and confirm whether an open source or Starter instance can publish, curate and verify items for the whole organization. Record the answer against the plan you intend to buy, since a plan change later can alter how definitions are shared.
Library docsSupported data sources for metrics
A metric is tied to a data source, formula and set of dimensions, so the databases you rely on determine where official calculations can live. Confirm with Metabase which of your warehouses and operational databases support metrics on your version, and test one metric per source with a known result. Note any source that needs a workaround, such as a view, so the definition stays owned by the team that maintains it.
Metric behavior under database permissions
A metric runs as the Metabase database connection or as the user asking the question, depending on how permissions and impersonation are set up. Test a metric as users in restricted groups to see whether the same formula returns different rows or fails. If row-level rules are needed, confirm which permission methods your plan includes, because a metric that looks correct for an admin can expose or hide data for other groups.
Export and embedding behavior
Once a metric appears in a dashboard, it can be exported as CSV, XLSX or PDF or shown in an embedded view, and those paths may apply permissions differently from on-screen results. Confirm which download permissions and row limits apply to metric outputs, and check whether embedded views of a metric need SSO, which requires Pro or Enterprise. Verify that the exported figure matches the on-screen figure for the same filters.
Embedding docsSerialization and Git review needs
If definitions must move from a development instance to production or be reviewed in pull requests, the metric and Library content has to travel with it. Ask Metabase which content types serialize, what is left behind, and whether metrics are included in the export. Decide early whether your team needs Git-based review, because adding it later can mean reworking how content is built and promoted.
Ownership and upgrade drift
Metrics and Library entries are only authoritative if someone owns them and they survive upgrades unchanged. Plan who approves a change to an official calculation, and test a known metric before and after a release upgrade on a copy of your application database. Metabase releases follow an LTS or monthly cadence, so confirm the version you will run and its support end date before you publish definitions that other teams depend on.
- LTS support window
- 14 months
What buyers ask about metrics, the Library and outside help
Do I need a semantic layer before I adopt dbt?
No. A semantic layer is useful when several teams calculate the same number differently, and it does not depend on dbt. Metabase metrics define the official calculation once, with a data source, a formula and the dimensions people can break out and filter by. If your transformations already live in dbt and your teams agree on definitions there, keep them there and point Metabase at the warehouse tables. Many organizations use both: dbt builds the clean tables and Metabase metrics and the Library govern how those tables are presented to business users. The decision turns on where your definitions are already agreed and who has to maintain them.
What drives the effort of a metrics and Library project?
Effort follows four factors: the number of KPIs to define, the quality of the source data, the number of owners who must sign off on each definition, and the governance rules you want enforced. Ten well-understood metrics on clean tables is a very different job from forty metrics that depend on conflicting spreadsheets. Each owner adds review cycles, and each governance rule, such as which collections are official or who may publish to the Library, adds configuration and testing. Ask any partner to break the quote down by these four factors so you can see which one drives the number.
How long does it take to scope a metrics and Library engagement?
The scope itself is usually the quickest part, because it needs an inventory of the KPIs, the source tables behind them and the people who own each definition. Duration then depends on how many metrics you need, how much source data needs cleaning, and how many approval rounds the owners require. No timeline should be accepted before that inventory exists. Ask the partner to state assumptions about your metric count, data readiness and owner availability, and to tie the schedule to a written scope that both sides agree before work starts.
What does the client team need to provide?
The work needs named business owners who can approve definitions, a data owner or engineer who can explain the source tables and their known gaps, and an administrator who can grant the Metabase permissions and publish content. You should also supply the existing KPI documents, dashboards and spreadsheets that people use today, because the differences between them are where most disagreements start. Plan for these people to be available for review sessions. Without them, metrics tend to be built on assumptions that the business later rejects.
Can our own team build metrics and the Library without outside help?
Yes, if your team has someone who knows the warehouse, understands the business calculations and has administrator access to Metabase. The harder part is usually governance rather than building: agreeing on owners, deciding what is marked as official, and keeping definitions current as the business changes. An internal team can build a first set quickly, but it often lacks time to run the review cycles and documentation. Outside help is most useful for the initial inventory, the governance design and a fixed-scope build, after which your team maintains the content.
Which Metabase plan do I need for the Library and metrics features?
Metrics are described in the Metabase documentation as the official way to calculate a number, and the Library is a centrally managed set of curated content and shared definitions. Some Library features require a Pro or Enterprise plan, so confirm the exact feature list against your plan before scoping. The Metabase pricing page lists Open Source (free), Starter, Pro and Enterprise, and it states that Enterprise is priced by quote starting at $20,000 per year. Plan requirements change over time, so verify the current pricing page before you commit to a design.
What goes wrong when definitions are kept only in the warehouse?
Definitions stored only in SQL views or warehouse procedures are often correct but invisible to business users, who then rebuild them in their own dashboards with slightly different filters. The usual symptom is two dashboards that show different revenue for the same month. A governed layer in Metabase makes the official calculation visible, attributes it to an owner and limits who can publish alternatives. Ask your partner to show, for your own KPIs, where each definition currently lives and which copies exist before deciding where the authoritative version belongs.
How DeployOpen scopes and delivers a metrics and Library rollout
DeployOpen agrees the scope in writing before any metric is built. For a metrics and Library rollout, the written scope usually lists the databases and tables in play, the business numbers to be defined as official metrics, the collections and glossary entries that will be curated in the Library, and which groups will see which content. It also records what is out of scope, such as dbt model changes, warehouse modeling or Library features that need a Pro or Enterprise plan. Ask the partner to confirm each of these in the quote, because the plan tier decides whether the Library and related controls can be used at all. Deliverables, acceptance criteria and the timeline are agreed in the same document, and the quote follows from that scope rather than from a list price.
Before build, DeployOpen works with your data owners to test each definition. For every metric, the team checks the data source, the formula, the filters that define an active customer or a completed order, and the dimensions people will break the number out by. The output of that session is a signed-off definition, with an owner named for each metric and each Library entry. Acceptance testing then compares metric results against numbers the finance or operations team already trusts, and records any gaps as decisions rather than silent fixes. Ownership, review cadence and the process for changing a definition are documented as part of handover, so the Library remains authoritative after the project closes.
After handover, a retainer can cover definition reviews, Metabase upgrades, permission audits and new metrics as the business changes. Ask whether support covers both the Metabase application and the metric definitions, since changes to the underlying schema often break metrics silently. Confirm response expectations, who approves changes to official metrics and how those changes are tested before they reach production. DeployOpen does not publish a price list, so the retainer scope and its cost should be requested in writing alongside the initial build quote.

