mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-19 06:38:04 +00:00
docs(cli/dataset): add dataset CLI get and upsert examples (#10688)
This commit is contained in:
parent
9307ec0580
commit
3ac9b72d2b
22
docs/cli.md
22
docs/cli.md
@ -341,6 +341,24 @@ datahub timeline --urn "urn:li:dataset:(urn:li:dataPlatform:mysql,User.UserAccou
|
|||||||
|
|
||||||
## Entity Specific Commands
|
## Entity Specific Commands
|
||||||
|
|
||||||
|
### dataset (Dataset Entity)
|
||||||
|
|
||||||
|
The `dataset` command allows you to interact with the dataset entity.
|
||||||
|
|
||||||
|
The `get` operation can be used to read in a dataset into a yaml file.
|
||||||
|
```shell
|
||||||
|
datahub dataset get --urn "$URN" --to-file "$FILE_NAME"
|
||||||
|
```
|
||||||
|
|
||||||
|
The `upsert` operation can be used to create a new user or update an existing one.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
datahub dataset upsert -f dataset.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
An example of `dataset.yaml` would look like as in [dataset.yaml](https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/examples/cli_usage/dataset/dataset.yaml).
|
||||||
|
|
||||||
|
|
||||||
### user (User Entity)
|
### user (User Entity)
|
||||||
|
|
||||||
The `user` command allows you to interact with the User entity.
|
The `user` command allows you to interact with the User entity.
|
||||||
@ -351,7 +369,7 @@ For detailed information, please refer to [Creating Users and Groups with Datahu
|
|||||||
datahub user upsert -f users.yaml
|
datahub user upsert -f users.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
An example of `users.yaml` would look like the following. You can refer to the [bar.user.dhub.yaml](https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/examples/cli_usage/user/bar.user.dhub.yaml) file for the complete code.
|
An example of `users.yaml` would look like as in [bar.user.dhub.yaml](https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/examples/cli_usage/user/bar.user.dhub.yaml) file for the complete code.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- id: bar@acryl.io
|
- id: bar@acryl.io
|
||||||
@ -379,7 +397,7 @@ For more information, please refer to [Creating Users and Groups with Datahub CL
|
|||||||
datahub group upsert -f group.yaml
|
datahub group upsert -f group.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
An example of `group.yaml` would look like the following. You can refer to the [foo.group.dhub.yaml](https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/examples/cli_usage/group/foo.group.dhub.yaml) file for the complete code.
|
An example of `group.yaml` would look like as in [foo.group.dhub.yaml](https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/examples/cli_usage/group/foo.group.dhub.yaml) file for the complete code.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
id: foogroup@acryl.io
|
id: foogroup@acryl.io
|
||||||
|
14
metadata-ingestion/examples/cli_usage/dataset/dataset.yaml
Normal file
14
metadata-ingestion/examples/cli_usage/dataset/dataset.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
urn: urn:li:dataset:(urn:li:dataPlatform:snowflake,long_tail_companions.adoption.actuating,PROD)
|
||||||
|
name: ACTUATING
|
||||||
|
schema_metadata:
|
||||||
|
fields:
|
||||||
|
- id: pk
|
||||||
|
urn: urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:snowflake,long_tail_companions.adoption.actuating,PROD),pk)
|
||||||
|
type: "SchemaFieldDataTypeClass({'type': NumberTypeClass({})})"
|
||||||
|
nativeDataType: NUMBER(1,0)
|
||||||
|
nullable: true
|
||||||
|
recursive: false
|
||||||
|
properties: {}
|
||||||
|
subtypes:
|
||||||
|
- Table
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user