table_preview
Rows of a table as JSON objects, paged by offset and limit.
Flags
| Flag | Value |
|---|---|
| Kind | query: reads values |
| Rows | one result, not a table |
| Deterministic | yes |
| Order matters | yes |
| Decomposable | no |
| Makes | no value |
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
table |
reference | yes | A value's reference. |
offset |
integer | no | at least 0 |
limit |
integer | no | at least 1, at most 10000 |
response_format |
"concise" | "detailed" | no | The byte budget: 64 KiB concise, 512 KiB detailed. |
Example
Over the example tables customers; ${input:name} is an input's reference and ${verb} the value an earlier call made.
table_preview {
"table": "${input:customers}",
"limit": 3
}Result
rows 0 to 3 of 45
{
"offset": 0,
"total": 45,
"items": [
{
"cid": 0,
"name": "c00",
"region": "south",
"since": "2020-11-07"
},
{
"cid": 1,
"name": "c01",
"region": "south",
"since": "2020-12-14"
},
{
"cid": 2,
"name": "c02",
"region": "west",
"since": "2022-11-28"
}
],
"nextOffset": 3
}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.