Metric Data
A DataLink for a metric, with an optional change. The DataLink properties, repeated because both definitions are closed, plus 'delta'.
Metadata
Field index
| Field | Type | Req. | Description |
|---|---|---|---|
| dataset | ref:DatasetId | yes | Id of the dataset. An unknown id is a 'dataset-unknown' error. |
| field | string | yes | The column whose cells are aggregated. An unknown name is a 'dataset-field-unknown' error. |
| aggregate | enum | yes | How the cells are combined; see DataLink.
|
| filter | ref:DataFilter | — | Only the rows that meet every condition are used. Absent: every row. |
| delta | ref:MetricDelta | — | How the metric's change is computed. Absent: no change is computed, and a typed 'delta' on the metric is drawn as written. |
dataset
typeref:DatasetIdrequiredyesdefault—
Id of the dataset. An unknown id is a 'dataset-unknown' error.
field
typestringrequiredyesdefault—
The column whose cells are aggregated. An unknown name is a 'dataset-field-unknown' error.
{
"field": "ARR"
}aggregate
typeenumrequiredyesdefault—
How the cells are combined; see DataLink.
aggregate· Allowed values"sum""mean""min""max""count""first""last"
{
"aggregate": "sum"
}filter
typeref:DataFilterrequirednodefault—
Only the rows that meet every condition are used. Absent: every row.
filter[].op· Allowed values"=""!=""<""<="">"">=""in"
delta
typeref:MetricDeltarequirednodefault—
How the metric's change is computed. Absent: no change is computed, and a typed 'delta' on the metric is drawn as written.
delta.compare· Named choices (see schema for other values and constraints)"previous"delta.compare (oneOf 2).filter[].op· Allowed values"=""!=""<""<="">"">=""in"delta.as· Allowed values"difference""percent"
Complete definition constraints
{
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"field",
"aggregate"
],
"description": "A DataLink for a metric, with an optional change. The DataLink properties, repeated because both definitions are closed, plus 'delta'.",
"properties": {
"dataset": {
"$ref": "#/$defs/DatasetId",
"description": "Id of the dataset. An unknown id is a 'dataset-unknown' error."
},
"field": {
"type": "string",
"description": "The column whose cells are aggregated. An unknown name is a 'dataset-field-unknown' error.",
"examples": [
"ARR"
]
},
"aggregate": {
"type": "string",
"enum": [
"sum",
"mean",
"min",
"max",
"count",
"first",
"last"
],
"description": "How the cells are combined; see DataLink."
},
"filter": {
"$ref": "#/$defs/DataFilter",
"description": "Only the rows that meet every condition are used. Absent: every row."
},
"delta": {
"$ref": "#/$defs/MetricDelta",
"description": "How the metric's change is computed. Absent: no change is computed, and a typed 'delta' on the metric is drawn as written."
}
},
"examples": [
{
"dataset": "arr",
"field": "ARR",
"aggregate": "last",
"filter": [
{
"field": "Region",
"op": "=",
"value": "EMEA"
}
],
"delta": {
"compare": "previous"
}
}
]
}