mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-31 04:25:29 +00:00
fix: add docs on update description via graphQL (#8289)
Co-authored-by: socar-dini <hyejin.yoon@acryl.io> Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
This commit is contained in:
parent
e725d4df74
commit
9949f2ca66
@ -61,31 +61,31 @@ Here's an overview of what each API can do.
|
||||
|
||||
> Last Updated : Apr 8 2023
|
||||
|
||||
| Feature | GraphQL | Python SDK | OpenAPI |
|
||||
| ------------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------- |
|
||||
| Create a dataset | 🚫 | ✅ [[Guide]](/docs/api/tutorials/datasets.md) | ✅ |
|
||||
| Delete a dataset (Soft delete) | ✅ [[Guide]](/docs/api/tutorials/datasets.md#delete-dataset) | ✅ [[Guide]](/docs/api/tutorials/datasets.md#delete-dataset) | ✅ |
|
||||
| Delete a dataset (Hard delele) | 🚫 | ✅ [[Guide]](/docs/api/tutorials/datasets.md#delete-dataset) | ✅ |
|
||||
| Search a dataset | ✅ | ✅ | ✅ |
|
||||
| Create a tag | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ |
|
||||
| Read a tag | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ |
|
||||
| Add tags to a dataset | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ |
|
||||
| Add tags to a column of a dataset | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ |
|
||||
| Remove tags from a dataset | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md#add-tags) | ✅ |
|
||||
| Create glossary terms | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ |
|
||||
| Read terms from a dataset | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ |
|
||||
| Add terms to a column of a dataset | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ |
|
||||
| Add terms to a dataset | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ |
|
||||
| Create domains | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ |
|
||||
| Read domains | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ |
|
||||
| Add domains to a dataset | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ |
|
||||
| Remove domains from a dataset | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ |
|
||||
| Crate users and groups | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ |
|
||||
| Read owners of a dataset | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ |
|
||||
| Add owner to a dataset | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ |
|
||||
| Remove owner from a dataset | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ |
|
||||
| Add lineage | ✅ [[Guide]](/docs/api/tutorials/lineage.md) | ✅ [[Guide]](/docs/api/tutorials/lineage.md) | ✅ |
|
||||
| Add column level(Fine Grained) lineage | 🚫 | ✅ | ✅ |
|
||||
| Add documentation(description) to a column of a dataset | ✅ [[Guide]](/docs/api/tutorials/descriptions.md#add-description-on-column) | ✅ [[Guide]](/docs/api/tutorials/descriptions.md#add-description-on-column) | ✅ |
|
||||
| Add documentation(description) to a dataset | 🚫 | ✅ [[Guide]](/docs/api/tutorials/descriptions.md#add-description-on-dataset) | ✅ |
|
||||
| Add / Remove / Replace custom properties on a dataset | 🚫 [[Guide]](/docs/api/tutorials/custom-properties.md) | ✅ [[Guide]](/docs/api/tutorials/custom-properties.md) | ✅ |
|
||||
| Feature | GraphQL | Python SDK | OpenAPI |
|
||||
| ------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------- |
|
||||
| Create a dataset | 🚫 | ✅ [[Guide]](/docs/api/tutorials/datasets.md) | ✅ |
|
||||
| Delete a dataset (Soft delete) | ✅ [[Guide]](/docs/api/tutorials/datasets.md#delete-dataset) | ✅ [[Guide]](/docs/api/tutorials/datasets.md#delete-dataset) | ✅ |
|
||||
| Delete a dataset (Hard delele) | 🚫 | ✅ [[Guide]](/docs/api/tutorials/datasets.md#delete-dataset) | ✅ |
|
||||
| Search a dataset | ✅ | ✅ | ✅ |
|
||||
| Create a tag | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ |
|
||||
| Read a tag | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ |
|
||||
| Add tags to a dataset | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ |
|
||||
| Add tags to a column of a dataset | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ |
|
||||
| Remove tags from a dataset | ✅ [[Guide]](/docs/api/tutorials/tags.md) | ✅ [[Guide]](/docs/api/tutorials/tags.md#add-tags) | ✅ |
|
||||
| Create glossary terms | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ |
|
||||
| Read terms from a dataset | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ |
|
||||
| Add terms to a column of a dataset | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ |
|
||||
| Add terms to a dataset | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ [[Guide]](/docs/api/tutorials/terms.md) | ✅ |
|
||||
| Create domains | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ |
|
||||
| Read domains | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ |
|
||||
| Add domains to a dataset | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ |
|
||||
| Remove domains from a dataset | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ [[Guide]](/docs/api/tutorials/domains.md) | ✅ |
|
||||
| Crate users and groups | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ |
|
||||
| Read owners of a dataset | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ |
|
||||
| Add owner to a dataset | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ |
|
||||
| Remove owner from a dataset | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ [[Guide]](/docs/api/tutorials/owners.md) | ✅ |
|
||||
| Add lineage | ✅ [[Guide]](/docs/api/tutorials/lineage.md) | ✅ [[Guide]](/docs/api/tutorials/lineage.md) | ✅ |
|
||||
| Add column level(Fine Grained) lineage | 🚫 | ✅ | ✅ |
|
||||
| Add documentation(description) to a column of a dataset | ✅ [[Guide]](/docs/api/tutorials/descriptions.md#add-description-on-column) | ✅ [[Guide]](/docs/api/tutorials/descriptions.md#add-description-on-column) | ✅ |
|
||||
| Add documentation(description) to a dataset | ✅ [[Guide]](/docs/api/tutorials/descriptions.md#add-description-on-dataset) | ✅ [[Guide]](/docs/api/tutorials/descriptions.md#add-description-on-dataset) | ✅ |
|
||||
| Add / Remove / Replace custom properties on a dataset | 🚫 [[Guide]](/docs/api/tutorials/custom-properties.md) | ✅ [[Guide]](/docs/api/tutorials/custom-properties.md) | ✅ |
|
||||
|
@ -199,8 +199,67 @@ Expected Response:
|
||||
<Tabs>
|
||||
<TabItem value="graphQL" label="GraphQL">
|
||||
|
||||
> 🚫 Adding Description on Dataset via `graphql` is currently not supported.
|
||||
> Please check out [API feature comparison table](/docs/api/datahub-apis.md#datahub-api-comparison) for more information,
|
||||
```graphql
|
||||
mutation updateDataset {
|
||||
updateDataset(
|
||||
urn:"urn:li:dataset:(urn:li:dataPlatform:hive,fct_users_created,PROD)",
|
||||
input: {
|
||||
editableProperties: {
|
||||
description: "## The Real Estate Sales Dataset\nThis is a really important Dataset that contains all the relevant information about sales that have happened organized by address.\n"
|
||||
}
|
||||
institutionalMemory: {
|
||||
elements: {
|
||||
author: "urn:li:corpuser:jdoe"
|
||||
url: "https://wikipedia.com/real_estate"
|
||||
description: "This is the definition of what real estate means"
|
||||
}
|
||||
}
|
||||
}
|
||||
) {
|
||||
urn
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Expected Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"updateDataset": {
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:hive,fct_users_created,PROD)"
|
||||
}
|
||||
},
|
||||
"extensions": {}
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="curl" label="Curl" default>
|
||||
|
||||
```shell
|
||||
curl --location --request POST 'http://localhost:8080/api/graphql' \
|
||||
--header 'Authorization: Bearer <my-access-token>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"query": "mutation updateDataset { updateDataset( urn:\"urn:li:dataset:(urn:li:dataPlatform:hive,fct_users_created,PROD)\", input: { editableProperties: { description: \"## The Real Estate Sales Dataset\nThis is a really important Dataset that contains all the relevant information about sales that have happened organized by address.\n\" } institutionalMemory: { elements: { author: \"urn:li:corpuser:jdoe\", url: \"https://wikipedia.com/real_estate\", description: \"This is the definition of what real estate means\" } } } ) { urn } }",
|
||||
"variables": {}
|
||||
}'
|
||||
```
|
||||
|
||||
Expected Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"updateDataset": {
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:hive,fct_users_created,PROD)"
|
||||
}
|
||||
},
|
||||
"extensions": {}
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="python" label="Python" default>
|
||||
|
Loading…
x
Reference in New Issue
Block a user