table_write
A table to bytes in a format, paged.
Flags
| Flag | Value |
|---|---|
| Kind | query: reads values |
| Rows | one result, not a table |
| Deterministic | yes |
| Order matters | no |
| Decomposable | no |
| Makes | a bytes value |
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
table |
reference | yes | A value's reference. |
format |
object | no | |
offset |
integer | no | at least 0 |
limit |
integer | no | at least 1 |
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_write {
"table": "${input:customers}",
"format": {
"kind": "csv"
},
"limit": 10
}Result
242 bytes written
{
"ref": "sha256:1679035db6182bc5f1432034e844645b5008568f1b4b49e9b1bab939968568ff",
"kind": "bytes",
"bytes": 242,
"rows": {
"total": 45,
"shown": 10,
"hint": "rows 0..10 of 45; write again with offset 10 for the rest"
}
}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.