Skip to content

Commit

Permalink
feat(cli): updated docs for cli commands
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkarchacryl committed Dec 4, 2024
1 parent f57dbab commit 287aff8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The `docker` command allows you to start up a local DataHub instance using `data

The `ingest` command allows you to ingest metadata from your sources using ingestion configuration files, which we call recipes.
Source specific crawlers are provided by plugins and might sometimes need additional extras to be installed. See [installing plugins](#installing-plugins) for more information.
[Removing Metadata from DataHub](./how/delete-metadata.md) contains detailed instructions about how you can use the ingest command to perform operations like rolling-back previously ingested metadata through the `rollback` sub-command and listing all runs that happened through `list-runs` sub-command.
[Removing Metadata from DataHub](./how/delete-metadata.md) contains detailed instructions about how you can use the ingest command to perform operations like rolling-back previously ingested metadata through the `rollback` sub-command and listing all runs that happened through `list-run-ids` sub-command.

```console
Usage: datahub [datahub-options] ingest [command-options]
Expand All @@ -115,6 +115,19 @@ datahub ingest -c ./examples/recipes/example_to_datahub_rest.dhub.yaml --dry-run
datahub ingest -c ./examples/recipes/example_to_datahub_rest.dhub.yaml -n
```

#### ingest --list-source-runs

The `--list-source-runs` option of the `ingest` command lists the previous runs, displaying their run ID, source name,
start time, status, and source URN. This command allows you to filter results using the --urn option for URN-based
filtering or the --source option to filter by source name (partial or complete matches are supported).

```shell
# List all ingestion runs
datahub ingest --list-source-runs
# Filter runs by a source name containing "demo"
datahub ingest --list-source-runs --source "demo"
```

#### ingest --preview

The `--preview` option of the `ingest` command performs all of the ingestion steps, but limits the processing to only the first 10 workunits produced by the source.
Expand Down
4 changes: 2 additions & 2 deletions docs/how/delete-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
To follow this guide, you'll need the [DataHub CLI](../cli.md).
:::

There are a two ways to delete metadata from DataHub:
There are two ways to delete metadata from DataHub:

1. Delete metadata attached to entities by providing a specific urn or filters that identify a set of urns (delete CLI).
2. Delete metadata created by a single ingestion run (rollback).
Expand Down Expand Up @@ -230,7 +230,7 @@ The second way to delete metadata is to identify entities (and the aspects affec
To view the ids of the most recent set of ingestion batches, execute

```shell
datahub ingest list-runs
datahub ingest list-run-ids
```

That will print out a table of all the runs. Once you have an idea of which run you want to roll back, run
Expand Down

0 comments on commit 287aff8

Please sign in to comment.