Skip to main content

Commands

Statements that define, change and inspect what Sercha holds, grouped by the object they act on. Most need an admin.

Model entities​

NameWhat it does
CREATE ENTITYDeclare an entity of the model, of one kind, with its records given by a query.
DROP ENTITYRemove a model entity, or an extracted entity from an ontology.

Relations​

NameWhat it does
CREATE RELATIONDeclare a kind of link between two model entities.
REFRESH RELATIONJudge an inferred relation's changed candidates again.
DROP RELATIONRemove a relation from the model.

Tables​

NameWhat it does
ALTER TABLE ... RENAME TOGive a stored table a layer name, tables.<source>.<table> or clean.<source>.<table>.
ALTER TABLE ... NORMALISEGroup a landed table's rows whose names differ only in case, punctuation or plurals into clean.<source>.<table>.
REFRESH TABLERebuild a cleaned table from its landed table, with the same rule.
ALTER TABLE ... MODEL IGNOREMark a landed or cleaned table as deliberately left out of the model.

Views​

NameWhat it does
CREATE VIEWSave a SELECT under a name that queries read like a table.
COMMENT ONDescribe a view, a materialized view or one of its columns.
DROP VIEWRemove a view.

Materialized views​

NameWhat it does
CREATE MATERIALIZED VIEWSave a SELECT and store its result, read from the store until it is refreshed.
REFRESH MATERIALIZED VIEWRecompute a materialized view from its stored text.
ALTER MATERIALIZED VIEWTurn a materialized view's automatic refresh on or off.
DROP MATERIALIZED VIEWRemove a materialized view and its stored results.

Tools​

NameWhat it does
CREATE TOOLSave a parameterised SELECT as a named tool that agents call with typed arguments.
CALLRun a saved tool with arguments.
DROP TOOLRemove a saved tool.
DETACH PRESETMake a view preset's views, materialized views, tools and edges the tenant's own.

Edges​

NameWhat it does
CREATE EDGEDeclare a named edge that links rows of two relations by a matching rule.
PREVIEW EDGEResolve an edge and report what it would hold, without storing anything.
REFRESH EDGESResolve declared edges again and rewrite their pairs.
DROP EDGERemove a named edge and its pairs, or an ontology edge.

People​

NameWhat it does
CREATE PEOPLEDeclare which dataset columns identify people, so each person's identities resolve into one person.
REFRESH PEOPLERebuild the people tables and resolve every source's people into unified people.
DROP PEOPLERemove a people declaration made with CREATE PEOPLE.

Access​

NameWhat it does
GRANTGive a user or group a privilege on a corpus, dataset, source, partition or container.
REVOKERemove a privilege a user or group was granted.

Looking around​

NameWhat it does
SHOW MODELList the model's entities and relations, the kinds, their row counts, or which tables the model reads.
SHOW LINKSEverything one record of the model is linked to, with a count and a sample per link.
SHOW LINEAGEThe rows a model record was made from, or the records built from one row.
SHOW RAWThe source item a landed row came from, as it last landed.
SHOW RECORDSFind records of any model entity by their key or title.
SHOWList the objects of one kind: corpora, tables, datasets, views, tools, edges, runs and more.
DESCRIBEOne object's definition: a model entity or relation, a view, an extracted entity, a tool or an edge.
EXPLAINShow how a SELECT would run, without running it.

Extracting entities from documents​

NameWhat it does
CREATE ONTOLOGYCreate an ontology, the set of entities to extract from documents.
CREATE ENTITY (extraction)Declare an entity of an ontology, with the columns extraction reads out of each document.
ALTER ENTITYChange an extraction entity's columns, description, natural key or sensitivity.
CREATE RECORD TYPEDeclare a kind of ledger record that people or agents write about extracted instances.
CREATE EDGE (ontology)Declare an edge between two extraction entities, resolved by extraction.
CREATE STRUCTUREDeclare how a corpus's documents are organised into levels, by path or by an agent.
CREATE CORPUSCollect documents from source folders into a corpus, optionally partitioned and bound to an ontology.
ALTER CORPUSRecompute a corpus's partition keys, or attach and detach dataset tables.
BIND CORPUSBind a corpus to an ontology so extraction reads its documents.
ALTER BINDINGTune a binding: an extraction hint, a document window, or pruning old generations.
RUN BINDINGStart an extraction run over a binding's documents, or estimate one.
CANCEL RUNStop an extraction run that has not finished.
REBIND CORPUSMove a corpus's binding to a new or earlier frozen version of its ontology.
UNBIND CORPUSRemove a corpus's binding to an ontology.
DROP RUNDelete a run with its graph, only its graph, or one graph node or edge.
DROP CORPUSRemove a corpus with its bindings, extracted graph, grants and the documents only it claimed.
DROP STRUCTURERemove a structure and its pack entities, unless a corpus is organised by it.
DROP ONTOLOGYRemove an ontology and everything declared in it.