IF Commons GitHub

dataCopy

concept

A copy of a dataset in a place, with why it exists, who answers for it and when it was last refreshed: what makes the copies of the data known and not only the original

Model operations. Written in commons/data/models/operations/mod.ts:103. Identified by dataCopyId.

Governance: attributes

classificationtextrequired

How sensitive it is

Becomes the column classification of data_copy.

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

dataCopyIdidentifierrequired

What identifies the copy

Becomes the column data_copy_id of data_copy.

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

datasettextrequired

The dataset it is a copy of

Becomes the column dataset of data_copy.

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

locationtextrequired

Where it is

Becomes the column location of data_copy.

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

ownertextoptional

Who answers for it

Becomes the column owner of data_copy.

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

purposetextrequired

Why it exists

Becomes the column purpose of data_copy.

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

refreshedAtinstantoptional

When it was last refreshed

Becomes the column refreshed_at of data_copy.

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

Logical: the table

Projects to the table data_copy with the primary key data_copy_id.

ColumnTypeNullRoleFrom
classificationtextfalseattributedataCopy.classification
data_copy_idtextfalseattributedataCopy.dataCopyId
datasettextfalseattributedataCopy.dataset
locationtextfalseattributedataCopy.location
ownertexttrueattributedataCopy.owner
purposetextfalseattributedataCopy.purpose
refreshed_attimestamptrueattributedataCopy.refreshedAt

Physical: SQL

CREATE TABLE IF NOT EXISTS "data_copy" (
    "data_copy_id" VARCHAR NOT NULL PRIMARY KEY,
    "dataset" VARCHAR NOT NULL,
    "location" VARCHAR NOT NULL,
    "purpose" VARCHAR NOT NULL,
    "owner" VARCHAR,
    "classification" VARCHAR NOT NULL,
    "refreshed_at" TIMESTAMPTZ
);

Physical: the typed table

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

const rows = await from(dataCopy).select((s) => ({ dataCopyId: s.dataCopy.dataCopyId, dataset: s.dataCopy.dataset })).run(runner);

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