How does it work?
Elementary uses a type of dbt test to collect metrics on your data and sync them up to Elementary Cloud. The metrics will be collected each time you rundbt test
, in a way that is similar to how training data for anomaly tests is collected.
A metric can be collected with or without an anomaly detection test configured on it.


How to set up a data content metric?
The monitored metrics are set up in the code, in a way similar to dbt tests. No mandatory configuration, however it is highly recommended to configure atimestamp_column
.
tests:
— elementary.collect_metrics:
timestamp_column: column name
time_bucket:
period: [hour | day]
count: int
dimensions: sql expression
metrics: monitors list
name: string
type: monitor type
columns: list
where_expression: sql expression
dbt test
, your data is split into buckets:
- The size of each bucket is configured by the
time bucket
field - Each row in the table is assigned to a bucket based on the timestamp of the
timestamp_column
selected - If dimensions were selected, each combination of dimensions will create a separate metric and then we compute the metric (or metrics) of choice for each bucket. We save the metrics in the Elementary schema and sync it to Elementary Cloud whenever you sync your environment.