mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-16 12:38:13 +00:00
fix(cli): don't use env for container, add example (#5012)
This commit is contained in:
parent
3c82f77a6c
commit
1fd5549ae3
@ -61,6 +61,11 @@ _Note: All these commands below support the soft-delete option (`-s/--soft`) as
|
||||
datahub delete --env DEV --entity_type dataset
|
||||
```
|
||||
|
||||
### Delete all containers for a particular platform
|
||||
```
|
||||
datahub delete --entity_type container --platform s3
|
||||
```
|
||||
|
||||
### Delete all Pipelines and Tasks in the DEV environment
|
||||
```
|
||||
datahub delete --env DEV --entity_type "datajob"
|
||||
|
||||
@ -352,9 +352,9 @@ def get_urns_by_filter(
|
||||
endpoint: str = "/entities?action=search"
|
||||
url = gms_host + endpoint
|
||||
filter_criteria = []
|
||||
if env:
|
||||
filter_criteria.append({"field": "origin", "value": env, "condition": "EQUAL"})
|
||||
entity_type_lower = entity_type.lower()
|
||||
if env and entity_type_lower != "container":
|
||||
filter_criteria.append({"field": "origin", "value": env, "condition": "EQUAL"})
|
||||
if (
|
||||
platform is not None
|
||||
and entity_type_lower == "dataset"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user