Data Link
A number computed from a dataset of this deck: 'aggregate' over the cells of 'field' in the rows that meet 'filter'. Engines compute it from the embedded rows and never fetch. The shape every content that can be linked to data shares; MetricData is this shape plus a change.
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: 'count' is the number of rows kept (cells included whatever they hold); 'sum' and 'mean' read numbers (in a column with no declared type also strings in strict decimal syntax); 'min' and 'max' read numbers, or time labels in a 'date' column; 'first' and 'last' are the first or last cell that is not null, in dataset order. A column typed 'text' or 'boolean' refuses 'sum', 'mean', 'min' and 'max' ('metric-data-aggregate' warning).
|
| filter | ref:DataFilter | — | Only the rows that meet every condition are used. Absent: every row. |
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: 'count' is the number of rows kept (cells included whatever they hold); 'sum' and 'mean' read numbers (in a column with no declared type also strings in strict decimal syntax); 'min' and 'max' read numbers, or time labels in a 'date' column; 'first' and 'last' are the first or last cell that is not null, in dataset order. A column typed 'text' or 'boolean' refuses 'sum', 'mean', 'min' and 'max' ('metric-data-aggregate' warning).
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"
Complete definition constraints
{
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"field",
"aggregate"
],
"description": "A number computed from a dataset of this deck: 'aggregate' over the cells of 'field' in the rows that meet 'filter'. Engines compute it from the embedded rows and never fetch. The shape every content that can be linked to data shares; MetricData is this shape plus a change.",
"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: 'count' is the number of rows kept (cells included whatever they hold); 'sum' and 'mean' read numbers (in a column with no declared type also strings in strict decimal syntax); 'min' and 'max' read numbers, or time labels in a 'date' column; 'first' and 'last' are the first or last cell that is not null, in dataset order. A column typed 'text' or 'boolean' refuses 'sum', 'mean', 'min' and 'max' ('metric-data-aggregate' warning)."
},
"filter": {
"$ref": "#/$defs/DataFilter",
"description": "Only the rows that meet every condition are used. Absent: every row."
}
}
}