ExportJob
object type
The record is the durable truth (stepsDone · examined · partCount · rowCount · bytes grow; partial says the run stopped short; problem says why). the budget rule is the SearchJob's VERBATIM — at most 50000 records examined · 300 s from the start (past it the job is expired WITH the parts written) · 400 machine steps — plus ONE bound of its own: 256 MiB on the composed file (the walk halts partial the step before it would cross). The plan's limit does NOT bound the export — every terminal record is written. ONE running export per signed-in session (the EXPORTLOCK marker — a second start refuses CONFLICT/EXPORT_JOB_ACTIVE naming the holder; a running search does not block it). Lifecycle queued → running → done | cancelled | expired | failed: cancel is the owner's (cancelExportJob) or the session's end — NO file is composed on cancel; done stays listed, the other terminals are doomed-class. The generic wire is READ-ONLY (the two reads) — the bespokes own the writes: startExportJob (THE PLAN GATE, then the per-family list-op offer AS THE CALLER — a family you may not list stops the plan before any read; the format csv | jsonl) · cancelExportJob · exportJobDownload (a query — the owner alone AND the reader's own list right over the plan's terminal family). The finish mints an in-app notice (export_finished · export_expired · export_failed), never on cancel.
Fields
| Field | Type | Notes |
|---|---|---|
id | ID ID! | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
sysId | String String! | The group-scoped human-facing system id (EX-…). |
type | String String! | The kind of record — always ExportJob here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: queued | running | done | cancelled | expired | failed. |
parentId | ID ID! | The parent org group (the Saga shape); for an ExportJob parentId === rootId. |
rootId | ID ID! | The org-group family root. |
createdAt | String String! | When the record was created, as a UTC timestamp. |
updatedAt | String String! | When the record last changed, as a UTC timestamp. |
revisionNum | Int Int! | How many times this record has been edited; the first save is 0. |
revision | ID ID! | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
refCaptions | RefCaption [RefCaption!]! | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
userId | ID ID! | The owner — the User who started the job; cancel and the download are theirs alone (the system hook cancels on their session’s end). IMMUTABLE at birth. |
sessionId | ID ID! | The signed-in session the job runs under — the EXPORTLOCK aggregate (ONE running export per session); a Session is not a catalog construct, so the id is opaque on the wire. IMMUTABLE at birth. |
planJson | String String! | The NORMALIZED plan as JSON text (the validated SearchPlan with its defaults applied; at most 8192 characters) — re-parsed and re-validated at every read. IMMUTABLE at birth. |
words | String String! | IMMUTABLE at birth. |
format | String String! | The file format the finish composes — csv (RFC 4180 through the one cell rule: the header = the column union over the whole set, nested leaves as dotted paths, arrays as JSON in the cell) or jsonl (one record per line — the parts’ bytes concatenated). The parts are JSON Lines either way. IMMUTABLE at birth. |
reportJson | String | The report arm (📊 THE REPORT ENGINE): the validated ReportSpec as JSON text (at most 12288 characters — the reportRun grammar VERBATIM; its plan equals planJson's), re-parsed at the finish to compose the file (a projection's columns or an aggregate's groups); the job's words are then the report's. IMMUTABLE at birth; null on a plain export. |
stepsDone | Int Int! | Machine steps taken so far (0 at birth; stamped by the step lane). |
examined | Int Int! | Records examined so far across every walk and hydrate (0 at birth) — the budget law’s counter. |
partCount | Int Int! | Parts written so far (0 at birth; +1 per terminal page that kept at least one record). |
rowCount | Int Int! | Rows written so far across every part (0 at birth) — the file’s row count at the finish. |
bytes | Int Int! | Bytes written so far across every part (0 at birth) — tracked against the 256 MiB file ceiling; the composed file’s size at the finish. |
partial | Boolean Boolean! | True when the run halted before the end — cancelled · expired · refused · the byte ceiling; the file holds what was written. |
fileKey | String | The file’s object key under exports/<rootId>/<jobId>/ — stamped at the finish. Null while live and on a cancel. |
fileName | String | The file’s name — <family>-<YYYYMMDD-HHMMSS>-<sysId>.<csv|jsonl> at the finish instant (ASCII); what exportJobDownload is saved as. Null while live and on a cancel. |
fileTtl | Int | The file’s expiry (epoch SECONDS = finishedAt + 7 days) — the download’s lazy-TTL gate. Null until the finish. |
startedAt | String | The running instant (UTC ISO-8601 — the clock’s zero). Null while queued. |
finishedAt | String | The terminal instant (UTC ISO-8601). Null while live. |
problem | String | Why the run stopped short — the executor’s refusal in its teaching voice (the budget, the frontier, the step cap), the byte ceiling, the expiry, the start refusal, or a machine fault’s cause. Null on done. |
sfExecutionArn | String | The ops/reconcile handle. |