table_filter
The rows where a Bool expression is true.
Flags
| Flag | Value |
|---|---|
| Kind | construct: makes a value from values |
| Rows | keeps some rows |
| Deterministic | yes |
| Order matters | no |
| Decomposable | yes |
| Makes | a table value |
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
table |
reference | yes | A value's reference. |
predicate |
expr | yes | A Bool expression over the input's columns. |
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_filter {
"table": "${input:orders}",
"predicate": {
"fn": "eq",
"args": [
{
"col": 7
},
{
"lit": "open",
"type": {
"kind": "utf8"
}
}
]
}
}Result
54 rows
{
"ref": "sha256:5c50f07a096af21e0051d02c87b3bba2bcc27861a28b3fcd1439584041960e01",
"kind": "table",
"rows": 54,
"schema": "…"
}In the hint language
The same step as a plan, as the language prints it.
output out = from orders
filter status == "open"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.