IF Commons GitHub

workload

concept

A job, query set or service the platform runs, with who owns it, how often it runs and how critical it is: the register that capacity, cost and recovery are planned from

Model operations. Written in commons/data/models/operations/mod.ts:139. Identified by workloadId.

Governance: attributes

criticalityintegerrequired

How critical it is, 1 the most

Becomes the column criticality of workload.

Written at commons/data/models/operations/mod.ts:139

nametextrequired

Its name

Becomes the column name of workload.

Written at commons/data/models/operations/mod.ts:176

ownertextrequired

Who owns it

Becomes the column owner of workload.

Written at commons/data/models/operations/mod.ts:139

scheduletextrequired

When it runs, in words or a cron

Becomes the column schedule of workload.

Written at commons/data/models/operations/mod.ts:139

workloadIdidentifierrequired

What identifies the workload

Becomes the column workload_id of workload.

Written at commons/data/models/operations/mod.ts:139

Logical: the table

Projects to the table workload with the primary key workload_id.

ColumnTypeNullRoleFrom
criticalityintegerfalseattributeworkload.criticality
nametextfalseattributeworkload.name
ownertextfalseattributeworkload.owner
scheduletextfalseattributeworkload.schedule
workload_idtextfalseattributeworkload.workloadId

Physical: SQL

CREATE TABLE IF NOT EXISTS "workload" (
    "workload_id" VARCHAR NOT NULL PRIMARY KEY,
    "name" VARCHAR NOT NULL,
    "owner" VARCHAR NOT NULL,
    "schedule" VARCHAR NOT NULL,
    "criticality" INTEGER NOT NULL,
    CONSTRAINT "workload_name_uq" UNIQUE ("name")
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { workload } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/operations.auto.ts: do not edit.

import { from } from "@intellectual-frontiers/data/sql/typed";
import { workload } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(workload).select((s) => ({ workloadId: s.workload.workloadId, name: s.workload.name })).run(runner);

Titles, headings, exports, tables, columns and requirements. Esc closes.