Edit Metrics

Define and modify metrics in the Lightdash semantic layer using dbt YAML syntax.

3|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/yu-iskw/dbt-heros --skill edit-metrics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Edit Metrics
Source: https://github.com/yu-iskw/dbt-heros/tree/main/plugins/lightdash-development/skills/edit-metrics
Command: npx skills add https://github.com/yu-iskw/dbt-heros --skill edit-metrics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of defining and updating metrics within the Lightdash semantic layer, ensuring consistency and accuracy in data calculations.

Core Features & Use Cases

  • Metric Definition: Create aggregated calculations (sums, averages, etc.) using dbt YAML syntax.
  • Syntax Adherence: Ensures compliance with dbt 1.10+ and Fusion standards.
  • Reference Integration: Leverages references/basics.md and references/advanced.md for correct syntax and advanced configurations.
  • Use Case: Define a new total_revenue metric for the orders model by summing the amount column, referencing references/basics.md for the correct type: sum syntax.

Quick Start

Use the edit metrics skill to define a new metric named 'average_order_value' by averaging the 'order_total' column in the 'orders' model.

Frequently Asked Questions about Edit Metrics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define metrics in the Lightdash semantic layer using dbt?

To define Lightdash metrics, you write dbt YAML configurations specifying aggregation types like sum or average. This ensures consistent calculations directly within your dbt models using the 1.10+ standards.

Can I apply filters and groups when modifying Lightdash metrics?

Yes, you can modify Lightdash metrics with advanced configurations like filters and groups. The skill references advanced syntax patterns to apply these granular controls to your dbt models.

What is the correct dbt YAML syntax for creating an aggregated calculation?

The correct dbt YAML syntax for aggregated calculations involves defining the metric type, such as type: sum, at the column or model level. This skill uses reference files to ensure accurate dbt 1.10+ compliance.

Does the Lightdash semantic layer support atomic aggregations at the model level?

Yes, the Lightdash semantic layer supports atomic aggregations at both the column and model levels. This allows you to define metrics like total revenue by summing specific columns directly.

How do I update an existing metric in dbt YAML for Lightdash?

You update an existing metric by modifying its dbt YAML definition within your semantic layer. The skill ensures these modifications adhere to Fusion standards and references advanced configuration syntax.