Defining your schema
Last updated
Was this helpful?
Last updated
Was this helpful?
are associated with by managing objects with the following properties:
Make sure you learned about .
The process for publishing a schema is as follows:
Create a new schema definition
Upload the schema associated with the definition
Validate the schema
Publish the schema
If you remove an indexed property, you will instantly stop being able to run WHERE
queries and operators needing indexing for this query.
You can ask your mediarithmics contact to start a complete reindexing of your datamart if required
Retrieve the LIVE schema or the specified one for a given datamart, and save it as a .gql
file named schema-<DATAMARTID>-<SCHEMAID>.gql
.
Use it to download the schema you want to start with, usually the current LIVE version.
If you want to show the schema in the output, use the --stdout
flag.
Create a draft, upload a file, validate it, and publish the schema with this all-in-one command.
If a draft schema already exists, update it before publishing.
Latest LIVE schema is cloned, if available, and --noClone
flag is not set
You can keep your schema as a DRAFT and not publish it using the --skipPublish
flag.
GET
https://api.mediarithmics.com/v1/datamarts/:datamartId/graphdb_runtime_schemas
Returns all schemas and their status.
datamartId
integer
The ID of the datamart
Archived schemas are displayed, meaning you can watch your history
GET
https://api.mediarithmics.com/v1/datamarts/:datamartId/graphdb_runtime_schemas/:schemaId
datamartId
integer
The ID of the datamart
schemaId
integer
The ID of the schema
GET
https://api.mediarithmics.com/v1/datamarts/:datamartId/graphdb_runtime_schemas/:schemaId/text
Allows you to visualize how your schema is in the current version, or how it has been in archived versions
datamartId
string
The ID of the datamart
schemaId
integer
The ID of the schema
POST
https://api.mediarithmics.com/v1/datamarts/:datamartId/graphdb_runtime_schemas/:schemaId/clone
Creates a new DRAFT schema if there's no existing one, by cloning an existing one.
schemaId
integer
The ID of the schema to clone. Usually the current LIVE version.
datamartId
integer
The ID of the datamart
This is the preferred method to create a DRAFT schema, as it will keep all settings from the previous version, like cluster versions, and index sizes.
POST
https://api.mediarithmics.com/v1/datamarts/:datamartId/graphdb_runtime_schemas
Creates a new DRAFT schema if there's no existing one without cloning.
datamartId
integer
The ID of the datamart
For the schema to keep initial settings—for example, elastic search version, and index size—you need to clone the previous LIVE version. Only use this endpoint if you know the required settings and you can set them up before publishing.
PUT
https://api.mediarithmics.com/v1/datamarts/:datamartId/graphdb_runtime_schemas/:schemaId/text
Add the schema to content to the raw body of the request
datamartId
integer
The ID of the datamart
schemaId
integer
The ID of the schema
body
string
Raw schema to upload
POST
https://api.mediarithmics.com/v1/datamarts/:datamartId/graphdb_runtime_schemas/:schemaId/validation
Tells you if the uploaded schema is valid, and shows errors if there are any.
datamartId
integer
The ID of the datamart
schemaId
integer
The ID of the schema
POST
https://api.mediarithmics.com/v1/datamarts/:datamartId/graphdb_runtime_schemas/:schemaId/publication
The selected schema goes LIVE, and the actual LIVE schema is ARCHIVED. Will show an error if you didn't validate the schema.
datamartId
integer
The ID of the datamart
schemaId
integer
The ID of the datamart
After updating a schema, you can immediately use all its properties into the select
part of your and any operator that doesn't require indexing.
If you add a new indexed property, only new elements going into your datamart will be indexed. You will be able to run WHERE
queries and operators needing indexing, but your queries will not return values for elements already in your datamart. You can add a new indexed property by either adding a new property with or adding the @TreeIndex directive to an existing property.
You can use the to power up your schema definitions workflow.
Automatically handles status and :