Extend an existing schema document

In case a suitable (JSON/XML) schema has been found, but some important information is missing, it is strongly recommended not to extend this schema by means of an update. Since old schemas are then no longer compatible with the new version, in such a case a new schema should be registered based on the existing one.


Target Audience

  • Data Scientists

Ingredients

  • (local) MetaStore instance
  • Web Browser

Work Steps (Summary)

Extend an existing schema document

  • Step 1: Fetch selected schema
  • Step 2: Extend schema
  • Step 3: Register new schema

Step 1: Fetch selected schema

First of all the choosen schema has to be stored locally. If the schema is already registered in the MetaStore please refer to Step 1: Download schema.

Step 2: Extend schema

Add the missing fields to the schema and mark them as 'required'. Extend previous schema with a mandatory 'abstract' entry this would look like this:

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "http://example.com/example.json",
    "type": "object",
    "title": "The root schema",
    "description": "The root schema comprises the entire JSON document.",
    "default": {},
    "examples": [
        {
            "author": "Last Name, First Name",
            "title": "My first document",
            "creation_date": "2022-04-11"
        }
    ],
    "required": [
        "author",
        "title",
        "abstract",
        "creation_date"
    ],
    "properties": {
        "author": {
            "$id": "#/properties/author",
            "type": "string",
            "title": "Author:",
            "description": "The person who wrote the document.",
            "default": "",
            "examples": [
                "Last Name, First Name"
            ]
        },
        "title": {
            "$id": "#/properties/title",
            "type": "string",
            "title": "Title:",
            "description": "The title of the document.",
            "default": "",
            "examples": [
                "My first document"
            ]
        },
        "abstract": {
            "$id": "#/properties/abstract",
            "type": "string",
            "title": "Abstract:",
            "description": "Abstract of the document. (< 2000 characters)",
            "default": ""
        },
        "creation_date": {
            "$id": "#/properties/creation_date",
            "type": "string",
            "title": "Creation Date:",
            "description": "Creation date in the format 'YYYY-MM-DD'.",
            "default": "2022-01-01",
            "examples": [
                "2022-04-11"
            ]
        },
        "note": {
            "$id": "#/properties/note",
            "type": "string",
            "title": "Additional note:",
            "description": "Add some additional notes here. (optional)",
            "default": ""
        }
    },
    "additionalProperties": false
}

Step 2: Create new schema

Register new schema.

Schema Management List

Click on 'Register new Schema' to register a new schema. Fill the form with the metadata for the schema document. The following values are mandatory:

  • SchemaId
  • Mime Type: application/json or application/xml
  • Type: JSON or XML
  • Choose schema file via file chooser dialog.

Afterwards the form should look like this:

Schema Record Form

Note: If no authentication is made, all users are registered as 'SELF'. Otherwise the one who registers the schema gets the administration rights.

After clicking 'CREATE' the new schema will be listed inside the table:

List of Schemas