AlmondTill/G3N API

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

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The human-readable id, shaped like EX-… — stable for the record’s life.
typeString String!The kind of record — always ExportJob here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of queued, running, done, cancelled, expired or failed.
parentIdID ID!The parent org group (the Saga shape); for an ExportJob parentId === rootId.
rootIdID ID!The id of your organization group — every record of yours carries the same one.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID ID!The id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten.
refCaptionsRefCaption [RefCaption!]!The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption.
userIdID 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.
sessionIdID 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.
planJsonString 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.
wordsString String!Immutable at birth.
formatString 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.
reportJsonStringThe report arm: 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.
stepsDoneInt Int!Machine steps taken so far (0 at birth; stamped by the step lane).
examinedInt Int!Records examined so far across every walk and hydrate (0 at birth) — the budget law’s counter.
partCountInt Int!Parts written so far (0 at birth; +1 per terminal page that kept at least one record).
rowCountInt Int!Rows written so far across every part (0 at birth) — the file’s row count at the finish.
bytesInt 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.
partialBoolean Boolean!True when the run halted before the end — cancelled · expired · refused · the byte ceiling; the file holds what was written.
fileKeyStringThe file’s object key under exports/<rootId>/<jobId> — stamped at the finish. Null while live and on a cancel.
fileNameStringThe 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.
fileTtlIntThe file’s expiry (epoch seconds = finishedAt + 7 days) — the download’s lazy-TTL gate. Null until the finish.
startedAtStringThe running instant (UTC ISO-8601 — the clock’s zero). Null while queued.
finishedAtStringThe terminal instant (UTC ISO-8601). Null while live.
problemStringWhy 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.
sfExecutionArnStringThe ops/reconcile handle.

Used by