All OLP CLI commands have the following structure:
olp <command group> <command> <arguments> [required and/or optional parameters]
olp pipeline create pipeline-name --scope <YOUR_PROJECT_HRN>
The OLP CLI supports a set of characters that you can use to pass command parameters:
Space and equal (
By default, command parameters are separated with spaces, but you can also use the equal (
=) separator, as in the examples below:
olp catalog list --profile <your_profile_name>
olp catalog list --profile=<your_profile_name>
If you are using the tilde-prefix (
~) to denote a user's home directory in Linux environments, you must use a space as tilde cannot be combined with the
olp catalog layer stream put hrn:here:data:::catalog1 stream-layer1 --input ~/path/to/dir
|) and dash (
The pipe (
|) character lets you take the output of one command and send it as input to another command. The dash (
-) character allows capturing that output and passing it to a certain parameter of the other command.
In the example below, the
catalog show command returns the configuration of the
hrn:here:data:::catalog-1 catalog in JSON format. The
catalog update command takes the
hrn:here:data:::catalog-1 configuration (through
--config -) to update the configuration of the
hrn:here:data:::catalog-2 catalog, including catalog summary, name, description, and layer configuration:
olp catalog show hrn:here:data:::catalog-1 --json | olp catalog update hrn:here:data:::catalog-2 --config -
The OLP CLI's default output is optimized for human readability. Such exit codes are used:
0: returned when a command succeeds.
1: returned when a command was executed with the invalid parameters.
2: returned when the invalid configuration files were used.
3: returned when a command fails.
4: returned when a command was executed on the non-existing resources (mostly catalogs).
All commands provide a
--quiet flag that allows reducing the output to essential values only with no additional information.
Commands that display output in the console provide a
--json flag. Depending on the command, this flag shows more additional information in the output in the JSON format. You can also parse JSON output with a script.
Alternatively, you can set the
OLP_OUTPUT environment variable to
quiet to choose the output format. However, the flags have a higher priority than the environment variable.
To disable a previously set output format, set
verbose, which is its default value.