Skip to content

docs: document required_attributes and any_attributes on metrics - #1290

Merged
owlas merged 2 commits into
mainfrom
docs/metric-attribute-inheritance
Sep 29, 2026
Merged

owlas merged 2 commits into
mainfrom
docs/metric-attribute-inheritance

Conversation

@owlas

@owlas owlas commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Relates: lightdash/lightdash#24709

Documents metric-level required_attributes / any_attributes, added in lightdash/lightdash#30209. Merge after lightdash/lightdash#30209 ships.

Behaviour:

  • metrics accept both keys, with the same AND/OR logic as dimensions
  • model-level metrics (under the model's metrics) use only their own keys; they inherit nothing from the columns they reference
  • column-level metrics (under a column's metrics) inherit the dimension's keys; setting either key on the metric replaces the inherited value for that key only, which lets you expose an aggregate without exposing the column

Changes:

  • workspace-admin/user-attributes.mdx: new canonical section "Metric access control" (#metric-access-control), with dbt v1.10+, v1.9 and Lightdash YAML examples covering a model-level metric, an inheriting column metric and an overriding column metric. The summary list at the top now says the keys apply to tables, columns and metrics. The column-filtering notes mention the override. <Info> → <Note>.
  • semantic-layer/metrics.mdx: required_attributes / any_attributes rows in the metric configuration table; the model-level note says to set the keys on the metric.
  • embed/reference.mdx, embed/embed-metrics-catalog.mdx, agents/data-access.mdx: list metrics among the fields required_attributes applies to, and describe inheritance and override.
  • semantic-layer/dimensions.mdx: same wording; fixes the broken dbt examples (- name: / - salary:).

validate:docs passes on the changed files. Not run: mint validate, mint broken-links (mint isn't available in the environment).

🤖 Generated with Claude Code

https://claude.ai/code/session_01USjqEeuDVEJxmGdiVFfyZS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDxLPssdHreekX2y73SeRB
@mintlify

mintlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
lightdash 🟢 Ready View Preview Sep 29, 2026, 3:59 PM

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Documentation validation

✅ All blocking checks passed.

Component system

0 finding(s) across the corpus.

Findings on lines this pull request touched are annotated inline in Files changed.

View the validation run.

Metrics accept both keys. Column-level metrics inherit them from their
dimension and can override each key; model-level metrics use their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USjqEeuDVEJxmGdiVFfyZS
@owlas owlas changed the title docs: clarify how metrics inherit required_attributes docs: document required_attributes and any_attributes on metrics Sep 29, 2026
@owlas
owlas merged commit 70bac00 into main Sep 29, 2026
8 checks passed
@owlas
owlas deleted the docs/metric-attribute-inheritance branch September 29, 2026 17:23

This branch was successfully deployed

1 active deployment
staging — f0698839 Deployed Sep 29, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants