sketch_merge
Sketches of one kind and size to one.
Flags
| Flag | Value |
|---|---|
| Kind | construct: makes a value from values |
| Rows | one result, not a table |
| Deterministic | yes |
| Order matters | no |
| Decomposable | yes |
| Makes | a sketch value |
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
sketches |
array of reference | yes | 1 or more items |
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_fetch {
"table": "${input:orders}",
"count": 120
}
sketch_build {
"table": "${table_fetch}",
"kind": "hll",
"column": "customer",
"lg_k": 10
}
table_fetch {
"table": "${input:orders}",
"offset": 120
}
sketch_build {
"table": "${table_fetch}",
"kind": "hll",
"column": "customer",
"lg_k": 10
}
sketch_merge {
"sketches": [
"${sketch_build#0}",
"${sketch_build}"
]
}Result
2 sketches merged
{
"ref": "sha256:65ff85b25b41259cec32e351ee0526180d201edbb800510a2b05079a93a4d5f2",
"kind": "sketch",
"sketch": "hll"
}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.