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
Note
Adding 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-name
is the name used in the Query API to express the query predicate. -
index-key-type
describes the type of keys supported. Possible values are bool
, int
, string
, heretile
, or timewindow
. duration represents the length of a tile slice timewindow
key. zoom-level represents the heretile
zoom level.
Optional parameters:
-
--content-type <layer data type>
The content type of the layer, such as application/vnd.geo+json
and text/plain
. The default value is application/x-protobuf
. -
--content-encoding <encoding type>
The content encoding of the layer, such as gzip
. If this parameter is specified, all data in a layer is compressed by the specified algorithm. The default value is Uncompressed
, 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 as DE
for Germany, PL
for Poland, or CN-HK
for Hong Kong, China. These codes must be separated by spaces. -
--quiet
Displays empty output with no additional information.
Optional parameters for a volatile layer:
-
--max-memory-policy
Not 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. -
--ttl
The 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 are md5
, sha-1
, sha-256
. -
--partitioning <generic|heretile[:tilelevel1,tilelevel2...]>
The partitioning scheme of the layer, either heretile
or generic
. For heretile
, you can specify tile levels
separated by a comma, such as heretile:level1,level2
. The default value is generic
. -
--crc <CRC-32C>
The algorithm used to calculate a cyclic redundancy check; currently supported is only <CRC-32C>
(case-insensitive, you can use crc-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 are md5
, sha-1
, or sha-256
. -
--partitioning <generic|heretile[:tilelevel1,tilelevel2...]>
The partitioning scheme of the layer, either heretile
or generic
. For heretile
you can specify tile levels
separated by a comma, such as heretile:level1,level2
. The default value is generic
. -
--crc <CRC-32C>
The algorithm used to calculate a cyclic redundancy check; currently supported is only <CRC-32C>
(case-insensitive, you can use crc-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 are 7.days
, 15.days
, 1.month
, 2.months
, 3.months
, 4.months
, 5.months
, 6.months
, 1.year
, 1.5.years
, 2.years
, and unlimited
. The default TTL setting is 7.days
. -
--crc <CRC-32C>
The algorithm used to calculate a cyclic redundancy check; currently supported is only <CRC-32C>
(case-insensitive, you can use crc-32c
). -
--digest <md5|sha-1|sha-256>
The digest algorithm used to calculate the checksum for the layer. Possible values are md5
, 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"
Example:
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"
local 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:
-
--json
Displays the command result in JSON format. -
--quiet
Displays 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 --json
Output:
{
"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 as DE
for Germany, PL
for Poland, or CN-HK
for Hong Kong, China. These codes must be separated by spaces. -
--quiet
Displays 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 tag2
olp local catalog layer update hrn:local:data:::catalog1 old-layer --name newname ^
--description "New Description" --tags tag1 tag2
local 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]
Warning
Deleting 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:
-
--quiet
Displays 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-layer
local 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:
-
--quiet
Displays empty output with no additional information.
Note
The olp local catalog layer inspect
command starts a local Data API server and does not return control to the user until the process is killed.