local catalog layer
local catalog layer
The OLP CLI supports the following:
- add a layer to a local catalog
- show a layer in a local catalog
- update a layer in a local catalog
- delete a layer in a local catalog
- inspect a layer in a local catalog
local catalog layer add
NoteAdding interactive map layers to local catalogs is currently not supported.
Adds the specified layer to a local catalog.
olp local catalog layer add <catalog HRN> <layer ID> <layer name> <layer type> \
--summary <layer summary> [command options]olp local catalog layer add <catalog HRN> <layer ID> <layer name> <layer type> ^
--summary <layer summary> [command options]Required parameters:
<catalog HRN>The HRN of the catalog.<layer ID>The ID of the layer to add.<layer name>The human-readable name of the layer.<layer type>The type of the layer, either--versioned,--volatile,--stream,--index, or--objectstore.--summary <layer summary>A one-line summary of the layer contents.--description <layer description>A detailed description of the catalog and its contents. Enclose the description with quotes.
Required parameters for an index layer:
--index-definitions <index-key-name:index-key-type[:duration][:zoom-level]>Index definitions of the layer:index-key-nameis the name used in the Query API to express the query predicate.index-key-typedescribes the type of keys supported. Possible values arebool,int,string,heretile, ortimewindow. duration represents the length of a tile slicetimewindowkey. zoom-level represents theheretilezoom level.
Optional parameters:
--content-type <layer data type>The content type of the layer, such asapplication/vnd.geo+jsonandtext/plain. The default value isapplication/x-protobuf.--content-encoding <encoding type>The content encoding of the layer, such asgzip. If this parameter is specified, all data in a layer is compressed by the specified algorithm. The default value isUncompressed, which means no compression.--tags <tag1 tag2 ..>Catalog keywords used for search discovery.--schema <schema HRN>An HRN of the data schema for this layer.--billing-tags <tag1 tag2 ...>A list of billing tags. Used for search discovery.--coverage <code1 code2 ...>A list of ISO 3166 two-letter codes for countries and regions. Optionally, followed by up to three characters codes for subdivisions, such asDEfor Germany,PLfor Poland, orCN-HKfor Hong Kong, China. These codes must be separated by spaces.--quietDisplays empty output with no additional information.
Optional parameters for a volatile layer:
--max-memory-policyNot used for local catalogs.--data-redundancy <single-instance|multi-instance>Not used for local catalogs.--storage-capacity <size in MB>Not used for local catalogs.--ttlThe layer's time-to-live or expiry time in milliseconds.- Maximum value: 7 days (604800000 ms);
- Minimum value: 1 minute (60000 ms);
- Default value: 1 hour (3600000 ms).
--digest <md5|sha-1|sha-256>The digest algorithm to use to calculate the checksum for the layer. Possible values aremd5,sha-1,sha-256.--partitioning <generic|heretile[:tilelevel1,tilelevel2...]>The partitioning scheme of the layer, eitherheretileorgeneric. Forheretile, you can specifytile levelsseparated by a comma, such asheretile:level1,level2. The default value isgeneric.--crc <CRC-32C>The algorithm used to calculate a cyclic redundancy check; currently supported is only<CRC-32C>(case-insensitive, you can usecrc-32c).
Optional parameters for a stream layer:
--data-in <size><KB|MB>Not used for local catalogs.--data-out <size><KB|MB>Not used for local catalogs.--parallelization <number of Kafka partitions>Not used for local catalogs.--ttl <time in ms>The layer's time-to-live or expiry time in milliseconds.- Maximum value: 3 days (259200000 ms);
- Minimum value: 10 minutes (600000 ms);
- Default value: 1 hour (3600000 ms).
Optional parameters for a versioned layer:
--digest <md5|sha-1|sha-256>The digest algorithm to use to calculate the layer checksum. Possible values aremd5,sha-1, orsha-256.--partitioning <generic|heretile[:tilelevel1,tilelevel2...]>The partitioning scheme of the layer, eitherheretileorgeneric. Forheretileyou can specifytile levelsseparated by a comma, such asheretile:level1,level2. The default value isgeneric.--crc <CRC-32C>The algorithm used to calculate a cyclic redundancy check; currently supported is only<CRC-32C>(case-insensitive, you can usecrc-32c).
Optional parameters for an index layer:
--ttl <time in dd, mm, yy>The time-to-live or expiry time for the data in the index layer. Possible values are7.days,15.days,1.month,2.months,3.months,4.months,5.months,6.months,1.year,1.5.years,2.years, andunlimited. The default TTL setting is7.days.--crc <CRC-32C>The algorithm used to calculate a cyclic redundancy check; currently supported is only<CRC-32C>(case-insensitive, you can usecrc-32c).--digest <md5|sha-1|sha-256>The digest algorithm used to calculate the checksum for the layer. Possible values aremd5,sha-1,sha-256.
Example:
The command below adds a versioned layer with the ID new-layer
to catalog1.
olp local catalog layer add hrn:local:data:::catalog1 new-layer new-layer-name \
--versioned --summary "A summary"olp local catalog layer add hrn:local:data:::catalog1 new-layer new-layer-name ^
--versioned --summary "A summary"Output:
Layer new-layer has been added to the catalogExample:
The command below adds a versioned layer with the md5 digest, heretile
partitioning, and tile levels to catalog1.
olp local catalog layer add hrn:local:data:::catalog1 new-layer new-layer-name \
--versioned --partitioning heretile:7,10,14 --digest md5 --summary "A summary"olp local catalog layer add hrn:local:data:::catalog1 new-layer new-layer-name ^
--versioned --partitioning heretile:7,10,14 --digest md5 --summary "A summary"Output:
Layer new-layer has been added to the cataloglocal catalog layer show
Displays the layer properties.
olp local catalog layer show <catalog HRN> <layer ID> [command options]Required parameters:
<catalog HRN>The HRN of the catalog.<layer ID>The ID of the layer to show.
Optional parameters:
--jsonDisplays the command result in JSON format.--quietDisplays the type of the layer and its partitioning scheme, separated by space.
Example:
The command below displays the test-layer properties inside the
test-catalog.
olp local catalog layer show hrn:local:data:::test-catalog test-layer --jsonOutput:
{
"summary": "Summary",
"volume": { "volumeType": "durable" },
"layerType": "versioned",
"billingTags": [],
"crc": "CRC-32C",
"name": "Test Layer",
"description": "some description",
"partitioningScheme": "generic",
"partitioning": { "scheme": "generic" },
"id": "test-layer",
"contentType": "application/octet-stream",
"tags": []
}local catalog layer update
Updates the specified layer in the local catalog.
olp local catalog layer update <catalog HRN> <layer ID> [command options]Required parameters:
<catalog HRN>The HRN of the catalog.<layer ID>The ID of the layer to update.
Optional parameters:
--name <layer name>The human-readable name of the layer.--summary <layer summary>A one-line summary of the layer contents.--description <layer description>A detailed description of the catalog and its contents. Enclose the description with quotes.--tags <tag1 tag2 ...>Catalog keywords used for search discovery.--schema <schema HRN>An HRN of the data schema for this layer.--billing-tags <tag1 tag2 ...>A list of billing tags used for search discovery.--coverage <code1 code2 ...>A list of ISO 3166 two-letter codes for countries and regions. Optionally, followed by up to three characters codes for subdivisions, such asDEfor Germany,PLfor Poland, orCN-HKfor Hong Kong, China. These codes must be separated by spaces.--quietDisplays empty output with no additional information.
Example:
The command below updates the name of layer from old-layer to
newname and the tags to tag1 and tag2.
olp local catalog layer update hrn:local:data:::catalog1 old-layer --name newname \
--description "New Description" --tags tag1 tag2olp local catalog layer update hrn:local:data:::catalog1 old-layer --name newname ^
--description "New Description" --tags tag1 tag2Output:
Layer old-layer has been updatedlocal catalog layer delete
Deletes the specified stream, volatile, index, or object store layer in the local catalog. Versioned layers cannot be deleted due to possible dependencies across other versioned layers.
olp local catalog layer delete <catalog HRN> <layer ID> [command options]
WarningDeleting a layer of a local catalog permanently and irrevocably removes both the data and the metadata associated with the layer.
Required parameters:
<catalog HRN>The HRN of the catalog.<layer ID>The ID of the layer to delete.
Optional parameters:
--quietDisplays empty output with no additional information.
Example:
The command below deletes the some-layer layer from the
hrn:local:data:::catalog1 catalog.
olp local catalog layer delete hrn:local:data:::catalog1 some-layerOutput:
Layer some-layer has been deletedlocal catalog layer inspect
Opens the local Data Inspector to inspect the specified layer. The data can be inspected visually (HERE Tile layers only) and structurally, provided that the layer is properly configured. For more information, see the Data Inspector Library documentation. The command fails if the local catalog or layer do not exist.
olp local catalog layer inspect <catalog HRN> <layer ID> [command options]Optional parameters:
--quietDisplays empty output with no additional information.
NoteThe
olp local catalog layer inspectcommand starts a local Data API server and does not return control to the user until the process is killed.
Example:
The command below opens an external browser and navigates to the
hrn:local:data:::first-catalog-example-id
catalog overview page in the platform portal.
olp local catalog layer inspect hrn:local:data:::first-catalog-example-id some-layerOutput:
A browser page should be opened shortly. If the browser does not show up, manually navigate to http://127.0.0.1:31006/inspector/?environment=here&hrn0=hrn:local:data:::first-catalog-example-id&layer0=some-layer
Press CTRL-C to stop the local inspector...Updated 21 days ago