Publish a Schema Artifact

You can publish your schema to the Artifact Service and further associate the schema with your catalog layer. By default, all published schemas are private and available only for your personal use. You can share your schema with other platform users.

Before publishing the schema, check the values of the name, description, groupId, artifactId, and version fields in the Maven project POM file. These values identify your schema on the HERE platform. Note that the length of the description field is limited to 1000 characters.

By default, the HERE platform runs a number of validations on the protobuf files to ensure their conformance to the platform style when you:

  • Try to publish a nonvalidated schema to the platform, or
  • Intend to install a nonvalidated schema in your local Maven repository.

Warning

You can disable protobuf validations but note that the HERE platform does not guarantee backward compatibility for any nonvalidated schemas. To ensure that your schema consumers do not experience backward compatibility issues due to breaking changes, please configure your schema project to utilize validation. Otherwise, follow the best practices for schema creation.

Publish to the HERE Platform

To publish a schema,

  1. If you want to publish the schema in a HERE platform project, specify the project's HERE resource number (HRN) in the here.token.scope property in your local ~/.here/credentials.properties file. You can get the project HRN from the HERE platform portal by clicking Projects Manager in the launcher.
  2. Enter the following command in your schema project folder:

      mvn deploy
    

To find a newly published schema in the HERE platform portal, select the Data tab and then click Browse schemas.

You can specify your published schema in the layer definition during layer creation. For more information, see the catalog layer add or catalog layer update command descriptions in the OLP Command Line Interface Developer Guide.

Use a Schema Locally

If you don't want to publish your schema and intend to use it locally, you can install the schema in your local Maven repository. To do so, enter the following command in your schema project folder:

mvn install

After publishing the schema, you can include it in your streaming or batch project as a Maven dependency. For Java bindings, use the artifact from the project with _java in the title. For Scala bindings, use the artifact from the project with _scala in the title.

Include a Schema in a Maven Project

You can include schema artifacts as dependencies in your Maven project if the schema is:

  • Installed locally
  • Published to the platform by you
  • Shared with you
  • Defined in a layer of a catalog shared with you

To use a schema in your project, include the target schema artifact in the POM file as a dependency.

To include an existing schema shared with you, see the Artifact Service chapter in Dependency Management.

Share a Schema Artifact

Schemas are held to the same privacy standards as data, which means that all schemas and data are private by default. Only the schema creator can access the schema until it is shared or used within the HERE platform to operate on data or visualize data on a map.

You can share your schemas with others either through the HERE platform portal or the OLP Command Line Interface (CLI).

To share a schema thourgh the HERE platform portal:

  1. Open the Data tab.
  2. Click Browse schemas.
  3. Find your schema.
  4. In the dropdown menu, select the version.
  5. Click the Sharing tab.
  6. Share your schema with others.

To share a schema via the OLP CLI, see the schema grant and schema revoke command descriptions in the Command Line Interface Developer Guide.

results matching ""

    No results matching ""