Below is an example of an metric called utilization
which measures usage over time. Metrics are aggregations of daily or event models.
Note, metrics are dynamic queries executed on-the-fly and have no corresponding SQL files or materialized tables.
A top-level YAML file describes all metrics:
_metrics.yaml
utilization:
# user-facing name
name: Utilization
type: metric
icon: mdi-poll
# human-readable description
description : |
Active utilization of purchased AND assigned seats. This is the number of monthly active contributors divided by seats purchased and assigned to users.
# the model to which this metric applies
base_model: customers
# the aggregation applied to the `target` below
# this is either "average" or "count"
aggregation: average
# this is a column on `customers`
target: active_utilization
# default rounding
rounding: 4
# this is the property by which to break down visualizations, by default
breakdown: plan
# default filters to apply
filters:
- column_id: plan
operator: not_equal_to
value: trial