Extensions
Extensions hold information tools need alongside the ontology, such as data sources and mappings for importing data, diagram layout, and custom data.
Custom data
Many objects have a custom field, directly or under their extensions, for any other data to keep with the model. The
specification gives it no meaning. Grouping data under a key named after the tool or organisation that writes it avoids
clashes with data written by other tools.
nodes:
person:
label: Person
extensions:
custom:
acme:
owner: catalogue-team
Model extensions
Extensions for a graph model.
| Field | Type | Required | Description |
|---|---|---|---|
|
map of table |
No |
Data source table schemas keyed by table id. |
|
map of list of mapping |
No |
Sets of data source mappings from tables to nodes and relationships, often used for importing. |
|
map |
No |
User-defined arbitrary data. |
Node extensions
Extensions for a node.
| Field | Type | Required | Description |
|---|---|---|---|
|
map of node index |
No |
Database indexes on this node keyed by id. |
|
No |
Optional visual information of this node. |
|
|
map |
No |
User-defined arbitrary data. |
Node display
Visual information for a node.
| Field | Type | Required | Description |
|---|---|---|---|
|
number |
Yes |
Horizontal position. |
|
number |
Yes |
Vertical position. |
|
string |
No |
Display colour of the node as a hex string, e.g. #FF8800. |
|
map |
No |
User-defined arbitrary data. |
Relationship extensions
Extensions for a relationship.
| Field | Type | Required | Description |
|---|---|---|---|
|
map of relationship index |
No |
Indexes on this relationship keyed by id. |
|
map |
No |
User-defined arbitrary data. |
Table
A data source table schema.
| Field | Type | Required | Description |
|---|---|---|---|
|
string |
Yes |
Where the table’s data comes from. |
|
list of table column |
No |
Columns of the table in their source order. |
|
list of strings |
No |
Names of the columns making up the primary key. |
|
map of foreign key |
No |
Foreign keys of the table keyed by id. |
|
map |
No |
User-defined arbitrary data. |
Table column
A column of a data source table.
| Field | Type | Required | Description |
|---|---|---|---|
|
string |
No |
Name of the column in the source. Unique within the table. |
|
string |
No |
Data type of the column in the source. |
|
integer |
No |
Size of the column. |
|
No |
Neo4j type suggested for values of this column. |
|
|
list of type |
No |
Neo4j types values of this column can be converted to when using the import tool. |
|
boolean |
No |
Whether the column can hold null values. Defaults to |
|
integer |
No |
Dimension of the column when it holds vectors. |
|
map |
No |
User-defined arbitrary data. |
Foreign key
A foreign key of a table.
| Field | Type | Required | Description |
|---|---|---|---|
|
list of strings |
Yes |
Names of the columns in this table which make up the key. |
|
Yes |
The table and columns the key refers to. |
|
|
map |
No |
User-defined arbitrary data. |
Foreign key reference
The target of a foreign key.
| Field | Type | Required | Description |
|---|---|---|---|
|
string |
Yes |
Id of the referenced table. |
|
list of strings |
No |
Names of the referenced columns. |
|
map |
No |
User-defined arbitrary data. |
Mapping
A mapping from a data source table to the graph. Either a node, relationship or query mapping.
One of node mapping, query mapping, relationship mapping,
chosen by its type.
Node mapping
Maps rows of a table to nodes.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
Yes |
Always |
|
string |
Yes |
Id of the node being mapped. |
|
string |
Yes |
Id of the source table. |
|
map of property mapping |
Yes |
Mappings from property ids to source columns. |
|
No |
Whether nodes are merged with existing nodes or always created. |
|
|
string |
No |
Label used to match existing nodes. |
|
list of strings |
No |
Ids of the properties which identify a node. |
|
string |
No |
Id of another mapping in the same list which must be imported before this one. Empty when there is no dependency. |
|
string |
No |
Optional id of this mapping, so other mappings in the same list can reference it in depends_on. |
Relationship mapping
Maps rows of a table to relationships.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
Yes |
Always |
|
string |
Yes |
Id of the relationship being mapped. |
|
string |
Yes |
Id of the source table. |
|
Yes |
How the start node of the relationship is matched. |
|
|
Yes |
How the end node of the relationship is matched. |
|
|
string |
No |
Label used to match existing relationships. |
|
map of property mapping |
No |
Mappings from property ids to source columns. |
|
No |
Whether relationships are merged with existing relationships or always created. |
|
|
list of strings |
No |
Ids of the properties which identify a relationship. |
|
string |
No |
Id of another mapping in the same list which must be imported before this one. Empty when there is no dependency. |
|
string |
No |
Optional id of this mapping, so other mappings in the same list can reference it in depends_on. |
Query mapping
Maps the results of a query run against a table.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
Yes |
Always |
|
string |
Yes |
Id of the source table. |
|
string |
Yes |
The query to run. |
|
string |
No |
Id of another mapping in the same list which must be imported before this one. Empty when there is no dependency. |
|
string |
No |
Optional id of this mapping, so other mappings in the same list can reference it in depends_on. |
Property mapping
Maps a property to a source column.
| Field | Type | Required | Description |
|---|---|---|---|
|
string |
Yes |
Name of the source column. |
Target mapping
Identifies a node at one end of a mapped relationship.
| Field | Type | Required | Description |
|---|---|---|---|
|
string |
No |
Label of the node. |
|
map of property mapping |
No |
Mappings from property ids to source columns used to match the node. |