Skip to content

Open Metadata Archive

An open metadata archive is a portable collection of open metadata type definitions and instances. It can be loaded each time a metadata access server starts up or added to a running metadata access server.

The open metadata archive has two types:

  • A content pack containing reusable definitions that are generally useful. They may come from the Egeria community or third parties.
  • A metadata export containing an export of metadata from a repository. They are used to transfer metadata between repositories that are not connected to the same cohort.

Structure

The logical structure of an open metadata archive is as follows:

Logical structure of an open metadata archive

Instances are linked together as follows:

  • Entities are stored as EntityDetail structures.
  • Relationships are stored as Relationship structures and link to their entities through the embedded EntityProxy structure.
  • The entities will include their classifications; however, for classifications that are attached to entities that are not included in the archive, they are stored in an ClassificationEntityExtension structure.

Instance structures in an open metadata archive

Typically, open metadata archives are encoded in JSON format and stored in a file; however, both the format and storage method can be changed by changing the open metadata archive connector.

Example of the header from the Cloud Information Model archive
{
  "class":"OpenMetadataArchive",
  "archiveProperties":
      {
          "class":"OpenMetadataArchiveProperties",
          "archiveGUID":"9dc75637-92a7-4926-b47b-a3d407546f89",
          "archiveName":"Cloud Information Model (CIM) glossary and concept model",
          "archiveDescription":"Data types for commerce focused cloud applications.",
          "archiveType":"CONTENT_PACK",
          "originatorName":"The Cloud Information Model",
          "originatorLicense":"Apache 2.0",
          "creationDate":1570383385107,
          "dependsOnArchives":["bce3b0a0-662a-4f87-b8dc-844078a11a6e"]
      }, 
   "archiveTypeStore":{},
   "archiveInstanceStore":{}
}

Processing

Open metadata archives are introduced into the server through the admin services either:

  1. provided as part of the contents of the server's configuration document, or
  2. through the operational command that added the archive directly into the running server's repository.

Processing of an open metadata archive

The archive is passed to the repository services' operational services, which in turn passes it on to the archive manager. Type information is passed to the repository content manager.

Both the types and instances are passed to the local repository (if there is one).

The archive loads in the following order:

  1. Attribute Type Definitions (AttributeTypeDefs) from the type store, through verifyAttributeTypeDef() and then addAttributeTypeDef():
    1. PrimitiveDefs
    2. CollectionDefs
    3. EnumDefs
  2. New Type Definitions (TypeDefs) from the type store, through verifyTypeDef() and addTypeDef() calls to the local repository:
    1. EntityDefs
    2. RelationshipDefs
    3. ClassificationDefs
  3. Updates to types (TypeDefPatches)
  4. Instances, as reference copies:
    1. Entities
    2. Relationships
    3. Classifications

Cohort propagation

If the server is connected to the cohort, the new content is sent as notifications to the rest of the cohort.

Configure metadata to load on startup

Open metadata archives contain pre-canned metadata types and instances for cohort members.

Archives can be added to the configuration document of a server to ensure their content is loaded each time the server is started. This is intended for repositories that do not store the archive content but keep it in memory.

Archives can also be loaded to a running server.

Metadata Archive Section in Configuration Document

Loading the same archive multiple times

If an archive is loaded multiple times, its content is only added to the local repository once - that is if the repository does not have the content already. No errors are recorded if the content is already in the repository.

Adding an archive to the configuration document

Typically, an open metadata archive is stored as JSON format in a file. To configure the load of such a file use the following command:

POST - specify file to load

POST {{platformURLRoot}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{serverName}}/open-metadata-archives/file

The body of the request should be the fully-qualified path name or path relative to the startup directory of the OMAG Server Platform -- and the file name should not have any quotes around it.

Alternatively it is possible to set up the list of open metadata archives as a list of connections. These connections refer to connectors that can read and retrieve the open metadata archive content.

POST - specify connection(s) to load

{{platformURLRoot}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{serverName}}/open-metadata-archives

The body of the request should be the list of connections from which to load archives.

This option can be used when the open metadata archives are not stored in a file, or a different file connector from the default one for the OMAG Server Platform is required.

Removing an archive from the configuration document on startup

Finally, this is how to remove the archives from the configuration document.

DELETE - remove archives from configuration document

{{platformURLRoot}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{serverName}}/open-metadata-archives

The body of the request should be the path to the metadata archive file.

Adding an archive to a running Metadata Access Store

Open Metadata Archives contain pre-canned metadata types and instances for Cohort Members.

Archives can be added to the configuration document of a server to ensure their content is loaded each time the server is started. This is intended for:

  • Archives containing type definitions.
  • Archives containing instances for repositories that do not store the archive content but keep it in memory. Although, if an archive is loaded multiple times, its content is only added to the local repository if the repository does not have the content already.

Archives can also be loaded to a running server using the following commands.

Typically, an open metadata archive is stored as JSON format in a file. To load such a file use the following command:

POST - load file

{{platformURLRoot}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{serverName}}/instance/open-metadata-archives/file

The body of the request should be the fully-qualified path name or path relative to the startup directory of the OMAG Server Platform -- and the file name should not have any quotes around it.

Alternatively it is possible to set up the list of open metadata archives as a list of connections. These connections refer to open metadata archive store connectors that can read and retrieve the open metadata archive content.

POST - load from connection(s)

{{platformURLRoot}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{serverName}}/instance/open-metadata-archives/connection

The body of the request should be the list of connections from which to load archives.

This option can be used when the open metadata archives are not stored in a file, or a different file format from the default one for the OMAG Server Platform is required.

Further information
Back to top