Edit Metrics
Skill for defining and modifying metrics in the Lightdash semantic layer using dbt 1.10+ and Fusion standards.
Purpose
Enables the creation of aggregated calculations (sums, averages, etc.) in dbt YAML.
Behavior
- •Atomic Aggregation: Define metrics either at the column level or the model level.
- •dbt 1.10+ Syntax: Use the
config.meta.metricsstructure. - •Reference Consultation: ALWAYS check
references/basics.mdandreferences/advanced.mdfor syntax patterns.
References
- •Basics: Common metric types and column-level definitions.
- •Advanced: Model-level metrics, filters, and custom SQL.
- •SQL Templating: Using
${field}and user attributes.
Rules
- •ALWAYS use dbt 1.10+ syntax.
- •Aggregate metrics must reference dimensions; non-aggregate metrics must reference metrics.
- •Refer to
read-metricsto verify existing calculations before adding new ones.