Schema Workflows

Schemas define the organization of data in each partition of a layer, including both the structure of the data and its content.

In the HERE platform, schemas are defined using Protocol Buffers. For more information on these concepts, see Schemas.

The OLP CLI provides tools for managing schemas, such as:

For more details, see Schema Commands.

Create a New Schema

Follow the steps below to create a new schema project:

  1. Generate a schema project using the provided archetype.
  2. Define a data schema.
  3. Publish the schema artifact.

For more details, see Archetypes Developer Guide

Show the Details of the Schema

To verify the details of the schema published to the HERE platform, run the schema show command. To run this command, you need to know the schema's HERE Resource Name (HRN).

To learn your schema HRN, do one of the following:

  • Go to the platform portal, select the Data tab, click Browse schemas, and look the schema up by its name, description, or group (as specified in the schema project POM file). Then, click the schema, select the Overview tab, and copy the schema's HRN to clipboard.

  • Use the schema list command and pass your schema's name or summary, or part of it, to the filter parameter. In the output, you'll find the HRN of your schema.

For example, to view the details of the schema with the HRN, you can execute the following command:

olp schema show \ --json
olp schema show ^ --json

The command displays the following results:

    "summary": "Schema project for OLP",
    "schemaValidationResults": [
                "fileExtension": true,
                "module": "proto",
                "packageConsistency": false,
                "backwardsCompatibility": true,
                "googleStyle": true,
                "majorVersionInPackage": true
                "fileExtension": false,
                "module": "ds",
                "packageConsistency": true,
                "backwardsCompatibility": false,
                "googleStyle": false,
                "majorVersionInPackage": false
    "hrn": "",
    "created": "2018-06-26T11:36:30.321Z",
    "groupId": "",
    "name": "Schema",
    "artifactId": "olp_cli_example_schema_v1",
    "updated": "2018-06-26T11:36:40.745Z",
    "version": "1.0.0"

Note that the schema HRN in the example above serves as a placeholder where you should pass the HRN of your own schema.

For more details about schema validation results, see Configuring Protobuf Validators

List All Schemas

To list the schemas to which you have access, run the schema list command.

olp schema list

The command lists the HRNs of the schemas to which you have access, each in a new line.

Download the Schema Package

A schema package is a data bundle that contains:

  • Local schema definition file(s)
  • Any definition files for schema dependencies
  • A manifest that declares the top-level Message
  • A JavaScript renderer (if available)

To download a schema package, run the schema get command.

olp schema get \ \
   --output /tmp/ds_bundle
olp schema get ^ ^
   --output /tmp/ds_bundle

The command displays the following results:

Schema package was successfully downloaded to /tmp/ds_bundle/

Delete the Schema

Enter the schema delete command and specify your schema HRN.

olp schema delete \
olp schema delete ^

The command displays the following results:

has been removed.

results matching ""

    No results matching ""