BI semantic layer · rule bi-reimplements-dbt-metric
BI measures that redefine a dbt metric
A Metacenta review checks this under the rule The BI layer reads dbt's metric rather than redefining it. Everything below applies whether or not you ever commission one.
What this rule checks
This rule flags each BI measure whose name matches a dbt metric's name or label. We then trace both to the warehouse tables they read. A copy over the metric's own model is rated low; one over a different table, or one we cannot trace, is rated higher.
Why it matters
Two copies of one definition drift the first time one changes and the other does not. Over a different table, the data team's metric and the business's number can disagree without either being wrong.
How to fix it
Read dbt's metrics in the BI layer instead of redefining them. Treat the dbt metric as canonical. Point the BI measure at the metric's model, or at the dbt Semantic Layer where the BI tool supports it, and delete the copy.
When it is fine to leave
A BI tool that cannot query the dbt Semantic Layer may need a copy. Keep it over the metric's own model. A deliberately different measure should be renamed, and then it no longer matches. This rule does not count towards the score.
What we need to check it
manifest.json from a project that defines metrics, plus at least one BI layer. Without metrics there is nothing to compare, so the rule is not applicable. We match on the normalised name only, never on the expression.