Course overview/Build the model3 of 3
Metric in the asset
Metric in the asset
Keep the definition, owner, currency basis, and limitation beside the mart that implements it.
Put the definition where changes happen
A mart header is part of the model. Use a folded description for the grain and metric, tags for selection and layer, and meta for business_owner, metric_definition, currency, expected_update, and known_limitation.
A metric definition in chat disappears from the next agent session and the next code review. A definition in meta.metric_definition travels with the SQL and can be challenged alongside it. The mart must depend on staging or core assets, never a raw source table.
Your task
Create pipeline/assets/mart/weekly_category_revenue.sql from your lesson-two contract. Add the folded description, layer:mart and domain:commerce tags, every required meta field, and dependencies that preserve the layered project. Run bruin validate.
Check your understanding
- Where does this course put a metric's exact definition, and why not in a chat thread?
pipeline/pipeline.ymlsetsowneranddomainsunderdefault:for every asset. When shouldweekly_category_revenue.sqlset its ownowner?- Name the five
metafields this lesson teaches for a mart asset carrying a metric.
Do it with your agent
Say next lesson, write the asset yourself, then say review my work. The agent should inspect the header, dependency lineage, real values in metadata, and a clean validation result.