table_aggregate_merge
State tables in shard order merged to the bytes table_aggregate gives over the shards together.
Flags
| Flag | Value |
|---|---|
| Kind | construct: makes a value from values |
| Rows | changes the rows |
| Deterministic | yes |
| Order matters | no |
| Decomposable | no |
| Makes | a table value |
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
tables |
array of reference | yes | 1 or more items. State tables from table_aggregate_partial, in shard order. |
response_format |
"concise" | "detailed" | no | The byte budget: 64 KiB concise, 512 KiB detailed. |
Example
Over the example tables orders; ${input:name} is an input's reference and ${verb} the value an earlier call made.
table_aggregate_partial {
"table": "${input:orders}",
"group_by": [
{
"name": "status",
"expr": {
"col": 7
}
}
],
"measures": [
{
"name": "orders",
"expr": {
"fn": "count_all",
"args": []
}
}
]
}
table_aggregate_merge {
"tables": [
"${table_aggregate_partial}",
"${table_aggregate_partial}"
]
}Result
5 rows from 2 shards
{
"ref": "sha256:a47616537706739258aae5caaa98a793ca3ecf6e2bad24d691d650cb024e039a",
"kind": "table",
"rows": 5,
"schema": {
"fields": [
{
"name": "status",
"type": {
"kind": "utf8"
},
"nullable": true,
"metadata": {}
},
{
"name": "orders",
"type": {
"kind": "int64"
},
"nullable": false,
"metadata": {}
}
],
"metadata": {}
}
}Diagnostics
A refusal comes back as ok: false with coded diagnostics; every code, with its fix, is on the diagnostics page. A parameter that does not match the schema above is ARG_INVALID, with the parameter's path.