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:
Hyejin Yoon 2023-07-17 17:29:00 +09:00 committed by GitHub
parent e725d4df74
commit 9949f2ca66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 89 additions and 30 deletions

View File

@ -62,7 +62,7 @@ Here's an overview of what each API can do.
> Last Updated : Apr 8 2023 > Last Updated : Apr 8 2023
| Feature | GraphQL | Python SDK | OpenAPI | | Feature | GraphQL | Python SDK | OpenAPI |
| ------------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------- | | ------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------- |
| Create a dataset | 🚫 | ✅ [[Guide]](/docs/api/tutorials/datasets.md) | ✅ | | 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 (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) | ✅ | | Delete a dataset (Hard delele) | 🚫 | ✅ [[Guide]](/docs/api/tutorials/datasets.md#delete-dataset) | ✅ |
@ -87,5 +87,5 @@ Here's an overview of what each API can do.
| Add lineage | ✅ [[Guide]](/docs/api/tutorials/lineage.md) | ✅ [[Guide]](/docs/api/tutorials/lineage.md) | ✅ | | Add lineage | ✅ [[Guide]](/docs/api/tutorials/lineage.md) | ✅ [[Guide]](/docs/api/tutorials/lineage.md) | ✅ |
| Add column level(Fine Grained) lineage | 🚫 | ✅ | ✅ | | 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 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 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) | ✅ | | Add / Remove / Replace custom properties on a dataset | 🚫 [[Guide]](/docs/api/tutorials/custom-properties.md) | ✅ [[Guide]](/docs/api/tutorials/custom-properties.md) | ✅ |

View File

@ -199,8 +199,67 @@ Expected Response:
<Tabs> <Tabs>
<TabItem value="graphQL" label="GraphQL"> <TabItem value="graphQL" label="GraphQL">
> 🚫 Adding Description on Dataset via `graphql` is currently not supported. ```graphql
> Please check out [API feature comparison table](/docs/api/datahub-apis.md#datahub-api-comparison) for more information, 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>
<TabItem value="python" label="Python" default> <TabItem value="python" label="Python" default>