Commands
Statements that define, change and inspect what Sercha holds, grouped by the object they act on. Most need an admin.
Model entities
| Name | What it does |
|---|---|
| CREATE ENTITY | Declare an entity of the model, of one kind, with its records given by a query. |
| DROP ENTITY | Remove a model entity, or an extracted entity from an ontology. |
Relations
| Name | What it does |
|---|---|
| CREATE RELATION | Declare a kind of link between two model entities. |
| REFRESH RELATION | Judge an inferred relation's changed candidates again. |
| DROP RELATION | Remove a relation from the model. |
Tables
| Name | What it does |
|---|---|
| ALTER TABLE ... RENAME TO | Give a stored table a layer name, tables.<source>.<table> or clean.<source>.<table>. |
| ALTER TABLE ... NORMALISE | Group a landed table's rows whose names differ only in case, punctuation or plurals into clean.<source>.<table>. |
| REFRESH TABLE | Rebuild a cleaned table from its landed table, with the same rule. |
| ALTER TABLE ... MODEL IGNORE | Mark a landed or cleaned table as deliberately left out of the model. |
Views
| Name | What it does |
|---|---|
| CREATE VIEW | Save a SELECT under a name that queries read like a table. |
| COMMENT ON | Describe a view, a materialized view or one of its columns. |
| DROP VIEW | Remove a view. |
Materialized views
| Name | What it does |
|---|---|
| CREATE MATERIALIZED VIEW | Save a SELECT and store its result, read from the store until it is refreshed. |
| REFRESH MATERIALIZED VIEW | Recompute a materialized view from its stored text. |
| ALTER MATERIALIZED VIEW | Turn a materialized view's automatic refresh on or off. |
| DROP MATERIALIZED VIEW | Remove a materialized view and its stored results. |
Tools
| Name | What it does |
|---|---|
| CREATE TOOL | Save a parameterised SELECT as a named tool that agents call with typed arguments. |
| CALL | Run a saved tool with arguments. |
| DROP TOOL | Remove a saved tool. |
| DETACH PRESET | Make a view preset's views, materialized views, tools and edges the tenant's own. |
Edges
| Name | What it does |
|---|---|
| CREATE EDGE | Declare a named edge that links rows of two relations by a matching rule. |
| PREVIEW EDGE | Resolve an edge and report what it would hold, without storing anything. |
| REFRESH EDGES | Resolve declared edges again and rewrite their pairs. |
| DROP EDGE | Remove a named edge and its pairs, or an ontology edge. |
People
| Name | What it does |
|---|---|
| CREATE PEOPLE | Declare which dataset columns identify people, so each person's identities resolve into one person. |
| REFRESH PEOPLE | Rebuild the people tables and resolve every source's people into unified people. |
| DROP PEOPLE | Remove a people declaration made with CREATE PEOPLE. |
Access
| Name | What it does |
|---|---|
| GRANT | Give a user or group a privilege on a corpus, dataset, source, partition or container. |
| REVOKE | Remove a privilege a user or group was granted. |
Looking around
| Name | What it does |
|---|---|
| SHOW MODEL | List the model's entities and relations, the kinds, their row counts, or which tables the model reads. |
| SHOW LINKS | Everything one record of the model is linked to, with a count and a sample per link. |
| SHOW LINEAGE | The rows a model record was made from, or the records built from one row. |
| SHOW RAW | The source item a landed row came from, as it last landed. |
| SHOW RECORDS | Find records of any model entity by their key or title. |
| SHOW | List the objects of one kind: corpora, tables, datasets, views, tools, edges, runs and more. |
| DESCRIBE | One object's definition: a model entity or relation, a view, an extracted entity, a tool or an edge. |
| EXPLAIN | Show how a SELECT would run, without running it. |
Extracting entities from documents
| Name | What it does |
|---|---|
| CREATE ONTOLOGY | Create 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 ENTITY | Change an extraction entity's columns, description, natural key or sensitivity. |
| CREATE RECORD TYPE | Declare 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 STRUCTURE | Declare how a corpus's documents are organised into levels, by path or by an agent. |
| CREATE CORPUS | Collect documents from source folders into a corpus, optionally partitioned and bound to an ontology. |
| ALTER CORPUS | Recompute a corpus's partition keys, or attach and detach dataset tables. |
| BIND CORPUS | Bind a corpus to an ontology so extraction reads its documents. |
| ALTER BINDING | Tune a binding: an extraction hint, a document window, or pruning old generations. |
| RUN BINDING | Start an extraction run over a binding's documents, or estimate one. |
| CANCEL RUN | Stop an extraction run that has not finished. |
| REBIND CORPUS | Move a corpus's binding to a new or earlier frozen version of its ontology. |
| UNBIND CORPUS | Remove a corpus's binding to an ontology. |
| DROP RUN | Delete a run with its graph, only its graph, or one graph node or edge. |
| DROP CORPUS | Remove a corpus with its bindings, extracted graph, grants and the documents only it claimed. |
| DROP STRUCTURE | Remove a structure and its pack entities, unless a corpus is organised by it. |
| DROP ONTOLOGY | Remove an ontology and everything declared in it. |