get-custom-metrics
Retrieve user-defined custom metrics from a Lightdash project, including their SQL expressions and associated tables, to discover business calculations for use in charts and queries.
Instructions
Get custom metrics defined in the project.
Custom metrics are user-defined metrics created in the Lightdash UI that aren't part of the dbt model definitions. These are stored separately and can be used in charts and dashboards.
Returns:
Custom metric definitions
SQL expressions used to calculate them
Associated tables/explores
Labels and descriptions
When to use:
To discover custom business metrics created by analysts
To understand what custom calculations are available
Before using a custom metric in a chart or query
Note: These are different from metrics defined in your dbt models.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_uuid | No | Optional: UUID of the project. If not provided, uses current project. |