local catalog
local catalog
The OLP CLI supports the following:
- list all local catalogs
- create a local catalog
- update a local catalog
- show a local catalog
- delete a local catalog
- list dependencies of a local catalog
- inspect a local catalog
local catalog list
Lists all local catalogs and returns a catalog name on a separate line.
To get more information about a catalog, see the
olp local catalog show command.
olp local catalog list [filter] [command options]Optional parameters:
[filter]Freeform text used to filter the catalog list. The filter checks if the catalog HRN contains thefilterstring.--jsonDisplays the command result in JSON format.--quietDisplays catalog HRNs, each on a new line.
Example with filtering:
olp local catalog list "first-catalog-example-id" --jsonOutput:
{"results": {"items": [
{"hrn": "hrn:local:data:::first-catalog-example-id"}
]}}Example without filtering:
olp local catalog list --jsonOutput:
{"results": {"items": [
{"hrn": "hrn:local:data:::first-catalog-example-id"},
{"hrn": "hrn:local:data:::second-catalog-example-id"}
]}}local catalog create
Creates an empty local catalog.
olp local catalog create <catalog ID> <catalog name> --summary <catalog summary> [command options]Required parameters:
<catalog ID>The ID that is used as a hint to create the catalog HRN.<catalog name>The human-readable name of the catalog. Overrides any values provided with the--configparameter through the command line.--description <catalog description>A detailed description of the catalog and its contents. Enclose the description in quotes.--summary <catalog summary>A one-line summary of the catalog contents. Overrides any values provided with the--configparameter through the command line.
NoteYou can also specify the summary for a catalog through a configuration file referenced by the
--configoption.
Optional parameters:
--config <path to config file>The path and name of the configuration file.--tags <tag1 tag2 ...>Catalog keywords used for search discovery.--jsonDisplays the catalog HRN in JSON format.--quietDisplays the catalog HRN.
Example:
The command below creates the empty local catalog first-catalog-example,
and displays the catalog's HRN in the output.
To pass multiple arguments to a parameter that accepts them, separate
the arguments with spaces.
olp local catalog create first-catalog-example-id first-catalog-example --summary "A new summary"Output:
Catalog hrn:local:data:::first-catalog-example-id has been createdExample:
The command below creates an empty local catalog second-catalog-example with two
tags (tag1 and tag2) in the platform and displays the catalog's HRN in the
console output.
olp local catalog create second-catalog-example-id second-catalog-example --tags tag1 tag2 --summary "A new summary"Output:
Catalog hrn:local:data:::second-catalog-example-id has been createdlocal catalog update
Updates an existing local catalog with the configuration specified in a configuration file.
olp local catalog update <catalog HRN> [command options]
WarningCatalog configuration changes
Like in the platform, you are not allowed to change a local catalog's layer configuration.
Required parameters:
<catalog HRN>The HRN of the catalog.
Optional parameters:
--config <path to config file>The path of the file with the updated configuration.--name <catalog name>The human-readable name of the catalog. Overrides values provided with--configthrough the command line.--summary <catalog summary>A one-line summary of the catalog contents. Overrides values provided with--configthrough the command line.--description <catalog description>A detailed description of the catalog and its contents. Enclose the description in quotes.--tags <tag1 tag2 ...>Catalog keywords used for search discovery. To unset tags, use--tags [].--quietDisplays empty output with no additional information.
Example:
olp local catalog update hrn:local:data:::first-catalog-example-id --config path/to/config.jsonExample configuration for a catalog with a volatile layer:
{
"name": "volatile-volatile-catalog",
"summary": "A short summary",
"description": "A longer description about what the catalog contains",
"tags": [
"tag1",
"tag2"
],
"layers": [
{
"id": "volatile-layer",
"name": "volatile-layer",
"summary": "A short summary",
"description": "A longer description about what the layer contains",
"layerType": "volatile",
"partitioningScheme": "generic",
"partitioning": {
"scheme": "generic"
},
"volume": {
"volumeType": "volatile"
},
"contentType": "application/x-protobuf"
}
]
}Example configuration for a catalog with a versioned layer:
{
"name": "versioned-durable-catalog",
"summary": "A short summary",
"description": "A longer description about what the catalog contains",
"tags": [
"tag1",
"tag2"
],
"layers": [
{
"id": "versioned-layer",
"name": "versioned-layer",
"summary": "A short summary",
"description": "A longer description about what the layer contains",
"layerType": "versioned",
"partitioningScheme": "generic",
"partitioning": {
"scheme": "generic"
},
"volume": {
"volumeType": "durable"
},
"contentType": "application/x-protobuf",
"crc": "CRC-32C",
"digest": "MD5"
}
]
}Example configuration for a catalog with a stream layer:
{
"name": "stream-durable-catalog",
"summary": "A short summary",
"description": "A longer description about what the catalog contains",
"tags": [
"tag1",
"tag2"
],
"layers": [
{
"id": "stream-layer",
"name": "stream-layer",
"summary": "A short summary",
"description": "A longer description about what the layer contains",
"layerType": "stream",
"partitioningScheme": "generic",
"partitioning": {
"scheme": "generic"
},
"volume": {
"volumeType": "durable"
},
"contentType": "application/x-protobuf"
}
]
}Output:
Catalog hrn:local:data:::first-catalog-example-id has been updatedExample with additional parameters:
olp local catalog update hrn:local:data:::first-catalog-example-id --name first-catalog-example-updated \
--summary "Updated summary" --description "Updated description"olp local catalog update hrn:local:data:::first-catalog-example-id --name first-catalog-example-updated ^
--summary "Updated summary" --description "Updated description"Output:
Catalog hrn:local:data:::first-catalog-example-id has been updatedFor more information on catalog configurations, see Data API.
local catalog show
Shows the local catalog configuration.
olp local catalog show <catalog HRN> [command options]Required parameters:
<catalog HRN>The HRN of the catalog
Optional parameters:
--jsonDisplays the command result in JSON format.--quietDisplays catalog's layer types and layer IDs, separated by space.
Example:
olp local catalog show hrn:local:data:::first-catalog-example-id --jsonOutput:
{
"summary": "",
"billingTags": [],
"hrn": "hrn:local:data:::first-catalog-example-id",
"created": "2018-03-02T10:41:09.309Z",
"name": "first-catalog-example",
"layers": [
{
"summary": "Summary",
"volume": {"volumeType": "durable"},
"layerType": "versioned",
"billingTags": [],
"crc": "CRC-32C",
"name": "Test Layer",
"contentEncoding": "gzip",
"description": "some description",
"partitioningScheme": "generic",
"partitioning": {"scheme": "generic"},
"id": "test-layer",
"contentType": "application/octet-stream",
"digest": "SHA-1",
"tags": []
},
{
"summary": "Summary",
"volume": {"volumeType": "durable"},
"layerType": "versioned",
"billingTags": [],
"crc": "CRC-32C",
"name": "Test Layer1",
"description": "some description",
"partitioningScheme": "generic",
"partitioning": {"scheme": "generic"},
"id": "test-layer1",
"contentType": "application/octet-stream",
"tags": []
}
],
"description": "",
"notifications": {
"enabled": false
},
"id": "first-catalog-example-id",
"version": 0,
"metadataVersion": 21
"metadataMinimumVersion": 0
"tags": []
}local catalog delete
Deletes a local catalog from your filesystem.
olp local catalog delete <catalog HRN> [command options]
WarningDeleting local catalogs
This command removes the local catalog completely; it cannot be restored.
Required parameters:
<catalog HRN>The HRN of the catalog.
Optional parameters:
--quietDisplays empty output with no additional information.
Example:
olp local catalog delete hrn:local:data:::first-catalog-example-idOutput:
Catalog hrn:local:data:::first-catalog-example-id has been removedlocal catalog dependency list
Lists all catalog dependencies for a specific version.
olp local catalog dependency list <catalog HRN>Required parameters:
<catalog HRN>The HRN of the catalog.
Optional parameters:
--version <catalog version>The catalog version. The default value is the latest version.--direct-onlyWhen enabled, only direct dependencies are displayed. When disabled, both direct and indirect dependencies are displayed. Disabled by default.--jsonDisplays the command result in JSON format.--quietDisplays HRNs of catalog dependencies, each on a new line.
Example:
The command below lists all direct dependencies for the
hrn:local:data:::first-catalog-example-id
catalog in JSON format.
olp local catalog dependency list hrn:local:data:::first-catalog-example-id --direct-only --jsonOutput:
{
"hrn": "hrn:local:data:::first-catalog-example-id",
"version": 1,
"dependencies": [{
"hrn": "hrn:local:data:::second-catalog-example-id",
"direct": true,
"version": 3
}]
}local catalog inspect
Opens the local Data Inspector in an external browser. The command fails if the local catalog does not exist.
To inspect a specific layer, see the
olp local catalog layer inspect command.
olp local catalog inspect <catalog HRN> [command options]Optional parameters:
--quietDisplays empty output with no additional information.
NoteThe
olp local catalog 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 inspect hrn:local:data:::first-catalog-example-idOutput:
A browser page should be opened shortly. If the browser does not show up, manually navigate to http://127.0.0.1:31005/inspector/?environment=here&hrn0=hrn:local:data:::first-catalog-example-id
Press CTRL-C to stop the local inspector...Updated 21 days ago