loadIdidentifierrequiredWhat identifies the load
Becomes the column load_id of load.
Written at commons/data/models/flow/mod.ts:89
One load: an id given at the first stage and carried on every row and effect it makes, so that it can be traced and undone as one
Model flow. Written in commons/data/models/flow/mod.ts:86. Identified by loadId.
loadIdidentifierrequiredWhat identifies the load
Becomes the column load_id of load.
Written at commons/data/models/flow/mod.ts:89
loadTypecode of loadTyperequiredWhat kind of load it is
Becomes the column load_type of load.
Written at commons/data/models/flow/mod.ts:90
rolledBackAtinstantoptionalWhen it was undone, where it was
Becomes the column rolled_back_at of load.
Written at commons/data/models/flow/mod.ts:94
sourcetextrequiredThe sender or system it came from
Becomes the column source of load.
Written at commons/data/models/flow/mod.ts:92
startedAtinstantrequiredtenanttextoptionalProjects to the table load with the primary key load_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
load_id | text | false | attribute | load.loadId |
load_type | text | false | attribute | load.loadType |
rolled_back_at | timestamp | true | attribute | load.rolledBackAt |
source | text | false | attribute | load.source |
started_at | timestamp | false | attribute | load.startedAt |
tenant | text | true | attribute | load.tenant |
CREATE TABLE IF NOT EXISTS "load" (
"load_id" VARCHAR NOT NULL PRIMARY KEY,
"load_type" VARCHAR NOT NULL,
"tenant" VARCHAR,
"source" VARCHAR NOT NULL,
"started_at" TIMESTAMPTZ NOT NULL,
"rolled_back_at" TIMESTAMPTZ,
CONSTRAINT "load_load_type_ck" CHECK ("load_type" IN ('delivery', 'backfill', 'incremental', 'replay'))
);CREATE TABLE IF NOT EXISTS "load" (
"load_id" TEXT NOT NULL PRIMARY KEY,
"load_type" TEXT NOT NULL,
"tenant" TEXT,
"source" TEXT NOT NULL,
"started_at" TIMESTAMPTZ NOT NULL,
"rolled_back_at" TIMESTAMPTZ,
CONSTRAINT "load_load_type_ck" CHECK ("load_type" IN ('delivery', 'backfill', 'incremental', 'replay'))
);CREATE TABLE IF NOT EXISTS "load" (
"load_id" TEXT NOT NULL PRIMARY KEY,
"load_type" TEXT NOT NULL,
"tenant" TEXT,
"source" TEXT NOT NULL,
"started_at" TEXT NOT NULL,
"rolled_back_at" TEXT,
CONSTRAINT "load_load_type_ck" CHECK ("load_type" IN ('delivery', 'backfill', 'incremental', 'replay'))
);Read and written from TypeScript with the types the model gives: import { load } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/flow.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { load } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(load).select((s) => ({ loadId: s.load.loadId, loadType: s.load.loadType })).run(runner);