Datasets

A dataset is what your application lists, shows in a grid, shares and blends. Its rows are outputs, each made by one run of a graph and kept as an immutable version, numbered from 1, beside a record of exactly what made it. The newest version a run made is the live one, and it is what a read or a blend answers with unless it names another.

Make one

Empty, for a run to fill:

curl -s -X POST http://127.0.0.1:3699/projects/shop/datasets \
  -H "Content-Type: application/json" \
  -d '{"name": "Q3 sales", "description": "cleaned Q3 orders with their store"}'
{"id": "ds_debf6ba6545386fd", "name": "Q3 sales", "description": "cleaned Q3 orders with their store",
 "live": null, "made": 0, "columns": [], "rows": 0,
 "created": "2026-11-28T19:25:55.265Z", "updated": "2026-11-28T19:25:55.265Z"}

It has no output until a run makes one; reading its rows until then is 404, dataset ds_… has no output yet. The body takes name, description and source, and nothing else.

A source as it is

With source, the first output is that source’s newest snapshot, as it is, and copies nothing:

curl -s -X POST http://127.0.0.1:3699/projects/shop/datasets \
  -H "Content-Type: application/json" \
  -d '{"source": "src_4a1382f7ca617fc6"}'

The same as uploading with ?dataset=true. Its version 1 is a pointer to the snapshot (bytes: 0), and its graph is the one-node pipeline that reads it:

{
  "manifest": {"version": 1, "made": "2026-11-28T19:27:02.710Z", "rows": 3, "bytes": 0,
               "pointer": {"source": "src_4a1382f7ca617fc6", "snapshot": 1},
               "columns": [{"name": "region", "role": "dimension", "type": "text"},
                           {"name": "budget", "role": "measure", "type": "integer"}]},
  "graph": {"nodes": [{"id": "source", "kind": "source", "source": "src_4a1382f7ca617fc6", "read": "latest"},
                      {"id": "output", "kind": "output", "input": "source"}]},
  "lineage": {"dataset": "ds_99a09f6e1d595492", "version": 1, "run": "", "...": "see Lineage below"},
  "run": null
}

The name defaults to the source’s. Refused for a source with no snapshot yet (a query source before its first pull) and for a source read with types of its own: a dataset over either is made by a run. A later run of a graph that is just one source node and the output, with no types, is a pointer too.

The manifest

GET .../datasets lists them, {"datasets": [...]}; GET .../datasets/{id} is one:

{
  "id": "ds_debf6ba6545386fd",
  "name": "Q3 sales",
  "description": "cleaned Q3 orders with their store",
  "created": "2026-11-28T19:25:55.265Z",
  "updated": "2026-11-28T19:26:15.357Z",
  "live": 1,
  "made": 1,
  "rows": 5,
  "columns": [
    {"name": "order_id", "role": "dimension", "type": "integer"},
    {"name": "order_date", "role": "dimension", "type": "date"},
    {"name": "store_id", "role": "dimension", "type": "integer"},
    {"name": "product", "role": "dimension", "type": "text"},
    {"name": "category", "role": "dimension", "type": "text"},
    {"name": "qty", "role": "measure", "type": "integer"},
    {"name": "unit_price", "role": "measure", "type": "decimal(3)"},
    {"name": "channel", "role": "dimension", "type": "text"},
    {"name": "revenue", "role": "measure", "type": "decimal(2)"},
    {"name": "store_name", "role": "dimension", "type": "text"},
    {"name": "region_code", "role": "dimension", "type": "text"}
  ],
  "notes": ["check failed, let through: store_name never empty (1 failing)"],
  "last_run": {"id": "q3-2026-11-28", "state": "succeeded", "at": "2026-11-28T19:26:15.357Z"}
}
FieldIs
livethe version reads and blends answer with; null before the first
madethe last version made
columns, rowsthe live version’s
noteswhat the run that made the live version let through: a check that warns, edits orphaned, ambiguous or flagged
last_runthe last run asked for, whatever it came to: a run that failed or was held leaves live where it was
backupwith an object store, when the copy was last made, and failed when it did not succeed
interrupteda job a restart found in flight and did not run again, until the next job

Read rows

curl -s -G http://127.0.0.1:3699/projects/shop/datasets/ds_debf6ba6545386fd/rows \
  --data-urlencode "sort=revenue:desc" \
  --data-urlencode "filter=region_code = 'NE'" \
  --data-urlencode "limit=2"
{
  "version": 1,
  "total": 2,
  "offset": 0,
  "columns": [{"name": "order_id", "role": "dimension", "type": "integer"}, "... the eleven columns ..."],
  "rows": [[50001, "2026-09-07", 101, "Whole milk", "Dairy", 4, "4.190", "web", "16.76", "Maple Street Market", "NE"],
           [50002, "2026-07-05", 102, "Bananas", "Produce", 1, "0.595", "store", "0.60", "Harbor Fresh", "NE"]]
}
ParameterDefaultDoes
versionthe live onewhich output
offset0rows to skip
limit1001 to 10,000
sortthe order the run made themcolumn, or column:desc, comma-separated: sort=region_code,revenue:desc
filternonea formula true for the rows shown

The sort and filter are for viewing: they change nothing kept. total counts what the filter keeps. A version that is not there is 404: dataset ds_debf6ba6545386fd has no version 9.

Versions

Every run that succeeds keeps a new version; nothing is changed in place, so an older version reads exactly as it did. GET .../datasets/{id}/versions/{k} answers what made it, in four parts:

PartIs
manifestthe version, when it was made, its columns, rows and bytes, the run that made it, or the pointer when it is a snapshot as it is
lineagewhat it was made from (below)
runthe run record, node by node; null for a source as it is
graphthe graph that ran, exactly as sent
{"manifest": {"version": 2, "made": "2026-11-28T19:26:31.735Z", "run": "q3-edits-1", "rows": 5, "bytes": 4034,
              "columns": ["..."]},
 "lineage": {"...": "..."}, "run": {"id": "q3-edits-1", "state": "succeeded", "...": "..."}, "graph": {"nodes": ["... six nodes ..."]}}

The graph is your application’s: it builds it and keeps its own versions of it. The copy here is what a version was made by, so a version can always be explained and made again.

Lineage

GET .../datasets/{id}/lineage, for the live version or ?version=k. From the run on Graphs and runs, abridged to three of its eleven columns:

{
  "dataset": "ds_debf6ba6545386fd",
  "version": 1,
  "run": "q3-2026-11-28",
  "graph": "949c0df23b1fa9586b15fd4636b3948d47ccb9f32d9947e80ba7f88b87ca9599",
  "pinned_at": "2026-11-28T19:26:14.088Z",
  "made_by": {"zsql": "0.7.4", "compiler": 2, "duckdb": "v2.0.0-dev88614"},
  "sources": [
    {"node": "sales", "source": "src_be28bf24ae006946", "kind": "upload", "snapshot": 2, "read": 1,
     "file_name": "sales_v2.csv", "sha256": "e24b261a431541a5bd56882898d20635773aa3cca2fd62784cc21f607457fd1c",
     "parse": {"encoding": "utf-8", "bom": false, "delimiter": ",", "delimiter_detected": true, "quote": "\"",
               "header": true, "header_detected": true, "rows": 6, "bad_rows": 0}},
    {"node": "stores", "source": "src_496cb47f693068fc", "kind": "upload", "snapshot": 1, "read": 3,
     "file_name": "stores.csv", "sha256": "ead8eb22a210c916de562a680d92f4244475f230a86418c9629930d8108dfeff",
     "parse": {"...": "as for sales"}}
  ],
  "roles": {"order_id": "dimension", "qty": "measure", "revenue": "measure", "store_name": "dimension", "...": "..."},
  "notes": ["check failed, let through: store_name never empty (1 failing)"],
  "columns": [
    {"column": "order_id", "from": [{"source": "src_be28bf24ae006946", "column": "order_id"}]},
    {"column": "revenue", "from": [{"source": "src_be28bf24ae006946", "column": "qty"},
                                   {"source": "src_be28bf24ae006946", "column": "unit_price"}]},
    {"column": "store_name", "from": [{"source": "src_496cb47f693068fc", "column": "store_name"}]}
  ]
}
FieldRecords
run, graphthe run that made it, and the hash of the graph kept beside it
sourceseach snapshot read, by node: the source, its kind, the snapshot, the version of how it was read (read), the file name, hash and parse, a push’s origin, a query snapshot’s semantic (branch, deploy, spec or expr, the SQL’s hash, the statement’s key and each column’s model field)
datasetseach dataset read, by node, at the version read: {"id", "version", "node"}
roleseach output column’s role
made_bythe server, the graph compiler and DuckDB versions
pinned_atthe time the run was pinned to: what today() and now() meant for every row and step of it
noteswhat the run let through
columnseach output column’s ancestry, back to the source columns it came from; a column of another dataset is dataset:<id>

Delete a dataset

curl -s -X DELETE http://127.0.0.1:3699/projects/shop/datasets/ds_aad92d187e281d13
{"removed": "ds_aad92d187e281d13"}

A hard delete: every version, every run record of it, its copy in the object store, and the kept blends that read it. Its sources stay, since other graphs may read them. A dataset a run is making now is 409. A graph that reads it with a dataset node fails its next run, saying so.

Next steps