CLI reference

The QGreenland CLI can be accessed by ./scripts/cli.sh. This will run a CLI inside the QGreenland container, which is required for most commands. If you prefer to run a local CLI, this is possible for commands like provenance, which only requires the configuration, with ./scripts/experimental/local_cli.sh.

qgreenland-cli

qgreenland-cli [OPTIONS] COMMAND [ARGS]...

cleanup

Clean up input, WIP, and/or output data created by QGreenland.

By default, clean up the compiled (but not zipped) datapackage.

qgreenland-cli cleanup [OPTIONS]

Options

-d, --dry-run

Print commands, but do not actually delete anything

-D, --dev <PATTERN>

Run a dev cleanup. Includes layer WIPs matching PATTERN, package WIP, released layers matching PATTERN, and all released packages. If PATTERN is an empty string, no layers will be cleaned up.

-P, --prod

Run a prod cleanup. Includes package WIP, all layer WIPs, and all released layers

-F, --delete-all-fetch

Delete all fetched dataset assets

-f, --delete-fetch-by-pattern <PATTERN>

Delete fetched dataset assets matching PATTERN ({dataset_id}.{asset_id})

-WL, --delete-all-wip-layers

Delete all WIP layers

-wl, --delete-wip-layers-by-pattern <PATTERN>

Delete WIP layers by PATTERN (layer ID)

-WP, --delete-wip-package

Delete WIP package

-RP, --delete-all-release-packages

Delete all released QGreenland packages

-rp, --delete-all-dev-release-packages

Delete all released dev QGreenland packages

-RL, --delete-all-release-layers

Delete all released layers

-rl, --delete-release-layers-by-pattern <PATTERN>

Delete released layers matching PATTERN

config-template

Generate a template to help with creating layers or datasets.

qgreenland-cli config-template [OPTIONS] COMMAND [ARGS]...

dataset

Generate a dataset configuration template.

qgreenland-cli config-template dataset [OPTIONS]

layer

Generate a layer configuration template.

qgreenland-cli config-template layer [OPTIONS]

fetch

Fetch assets for datasets matching PATTERN.

qgreenland-cli fetch [OPTIONS] PATTERN

Options

-d, --dry-run

Skip actual fetch, just list out dataset matches.

-w, --workers <workers>

Number of workers to use.

Default:

4

Arguments

PATTERN

Required argument

layers

List available layers matching PATTERN.

qgreenland-cli layers [OPTIONS] PATTERN

Options

-f, --format <format>

The format in which to display the layers.

Default:

ids

Options:

ids | titles | json

Arguments

PATTERN

Required argument

provenance

List steps that are taken to process layer LAYER_ID.

qgreenland-cli provenance [OPTIONS] LAYER_ID

Arguments

LAYER_ID

Required argument

run

Run pipelines for layers matching filters.

qgreenland-cli run [OPTIONS]

Options

-d, --dry-run

Skip actual run, just list out tasks.

-f, --fetch-only

Fetch the data, but do not process it.

-w, --workers <workers>

Number of workers to use.

Default:

1

-i, --include <PATTERN>

Include layers matching PATTERN.

-e, --exclude <PATTERN>

Exclude layers matching PATTERN.

--exclude-manual-assets

Exclude all “manual access” assets.

-z, --force-package-zip

Zip the package even if –include or –exclude are true.

-Z, --force-no-package-zip

DO NOT zip the package even if the whole pipeline was run.

version

Print the version of this code.

NOTE: The QGreenland output zip will be versioned with this string as well.

qgreenland-cli version [OPTIONS]