local catalog
The OLP CLI supports the following:
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 the filter
string. -
--json
Displays the command result in JSON format. -
--quiet
Displays catalog HRNs, each on a new line.
Example with filtering:
olp local catalog list "first-catalog-example-id" --json
Output:
{"results": {"items": [
{"hrn": "hrn:local:data:::first-catalog-example-id"}
]}}
Example without filtering:
olp local catalog list --json
Output:
{"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 --config
parameter 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 --config
parameter through the command line.
Note
You can also specify the summary for a catalog through a configuration file referenced by the --config
option.
Optional parameters:
-
--config <path to config file>
The path and name of the configuration file. -
--tags <tag1 tag2 ...>
Catalog keywords used for search discovery. -
--json
Displays the catalog HRN in JSON format. -
--quiet
Displays the catalog HRN.
Example:
The command below creates the empty local catalog first-catalog-example
, and displays the catalog's HRN in the output.
olp local catalog create first-catalog-example-id first-catalog-example --summary "A new summary"
To pass multiple arguments to a parameter that accepts them, separate the arguments with spaces.
Example:
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"
local catalog update
Updates an existing local catalog with the configuration specified in a configuration file.
olp local catalog update <catalog HRN> [command options]
Warning: Catalog 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 --config
through the command line. -
--summary <catalog summary>
A one-line summary of the catalog contents. Overrides values provided with --config
through 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 []
. -
--quiet
Displays empty output with no additional information.
Example:
olp local catalog update hrn:local:data:::first-catalog-example-id --config path/to/config.json
Example 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"
}
]
}
Example 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"
For 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:
-
--json
Displays the command result in JSON format. -
--quiet
Displays catalog's layer types and layer IDs, separated by space.
Example:
olp local catalog show hrn:local:data:::first-catalog-example-id --json
The output contains the configuration of the catalog in JSON format:
{
"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]
Warning: Deleting local catalogs
This command removes the local catalog completely; it cannot be restored.
Required parameters:
-
<catalog HRN>
The HRN of the catalog.
Optional parameters:
-
--quiet
Displays empty output with no additional information.
Example:
olp local catalog delete hrn:local:data:::first-catalog-example-id
local 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-only
When enabled, only direct dependencies are displayed. When disabled, both direct and indirect dependencies are displayed. Disabled by default. -
--json
Displays the command result in JSON format. -
--quiet
Displays 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 --json
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:
-
--quiet
Displays empty output with no additional information.
Note
The olp local catalog inspect
command starts a local Data API server and does not return control to the user until the process is killed.