IF Commons GitHub

signal

concept

A measurement the platform emits: its name, its kind, its unit and the attributes it carries, so that every emitter and every alert agree on what it is

Model operations. Written in commons/data/models/operations/mod.ts:157. Identified by signalId.

Governance: attributes

attributeNamestextrequired

The attributes it carries, separated by commas

Becomes the column attribute_names of signal.

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

kindcode of signalKindrequired

What kind of measurement

Becomes the column kind of signal.

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

meaningtextrequired

What it measures

Becomes the column meaning of signal.

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

ownertextrequired

Who answers for it

Becomes the column owner of signal.

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

signalIdidentifierrequired

What identifies the signal: its name

Becomes the column signal_id of signal.

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

unittextrequired

The unit

Becomes the column unit of signal.

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

Logical: the table

Projects to the table signal with the primary key signal_id.

ColumnTypeNullRoleFrom
attribute_namestextfalseattributesignal.attributeNames
kindtextfalseattributesignal.kind
meaningtextfalseattributesignal.meaning
ownertextfalseattributesignal.owner
signal_idtextfalseattributesignal.signalId
unittextfalseattributesignal.unit

Physical: SQL

CREATE TABLE IF NOT EXISTS "signal" (
    "signal_id" VARCHAR NOT NULL PRIMARY KEY,
    "kind" VARCHAR NOT NULL,
    "unit" VARCHAR NOT NULL,
    "attribute_names" VARCHAR NOT NULL,
    "meaning" VARCHAR NOT NULL,
    "owner" VARCHAR NOT NULL,
    CONSTRAINT "signal_kind_ck" CHECK ("kind" IN ('counter', 'gauge', 'histogram', 'event'))
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { signal } 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 { signal } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(signal).select((s) => ({ signalId: s.signal.signalId, kind: s.signal.kind })).run(runner);

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