truegrain - v1.1.0
    Preparing search index...

    Interface Job

    One asynchronously executing query.

    state is the field to branch on. running is the only non-terminal one, and cancelled is distinct from failed because the caller stopped it rather than the warehouse failing.

    interface Job {
        code: string;
        columns: string[];
        compiledSql: string;
        dialect: string;
        hint: string;
        jobId: string;
        modelVersion: string;
        namespace: string;
        nextCursor: string;
        raw: Record<string, unknown>;
        reason: string;
        retry: "" | Retry;
        rowCount: number;
        rows: Cell[][];
        state: JobState;
    }
    Index
    code: string

    Set only when the job failed. Same vocabulary as a synchronous refusal.

    columns: string[]

    The result columns, in order.

    compiledSql: string

    Available from the moment of submission: compilation, and therefore the governance gate, runs synchronously before the job exists.

    dialect: string

    The dialect the statement was written in.

    hint: string

    What to do instead. Set only on failure.

    jobId: string

    Opaque identifier, 128 bits of randomness. Poll and cancel with it.

    modelVersion: string

    The exact set of definitions that produced this.

    namespace: string

    The namespaces the query touched.

    nextCursor: string

    Present when more rows remain. Pass it back as cursor.

    raw: Record<string, unknown>

    The unparsed payload, so a new server field is readable without an SDK release.

    reason: string

    One sentence stating what went wrong. Set only on failure.

    retry: "" | Retry

    How to treat the failure. Empty unless the job failed.

    rowCount: number

    Rows in the whole result, not in this page.

    rows: Cell[][]

    One page of rows. Use run() to collect every page.

    state: JobState

    Where the query has got to. Branch on this.