sketch_build
A table column to a sketch value.
Flags
| Flag | Value |
|---|---|
| Kind | construct: makes a value from values |
| Rows | one result, not a table |
| Deterministic | yes |
| Order matters | no |
| Decomposable | yes, by the sketch itself |
| Makes | a sketch value |
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
table |
reference | yes | A value's reference. |
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.
sketch_build {
"table": "${input:orders}",
"kind": "kll",
"column": "price",
"seed": 1
}Result
a kll sketch
{
"ref": "sha256:a218b9a91816fd758ebc0e9b56d622f3bd6f6df93aa2242a5277f656c493c821",
"kind": "sketch",
"sketch": "kll"
}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.