docs(graphql): Correct mutation -> query for searchAcrossLineage examples (#9134)

This commit is contained in:
Ellie O'Neil 2023-10-27 20:18:31 -07:00 committed by GitHub
parent aceff13ebb
commit 9ae0e93d82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -113,12 +113,10 @@ Expected Response:
You can now see the lineage between `fct_users_deleted` and `logging_events`.
<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/apis/tutorials/lineage-added.png"/>
</p>
## Add Column-level Lineage
<Tabs>
@ -135,12 +133,10 @@ You can now see the lineage between `fct_users_deleted` and `logging_events`.
You can now see the column-level lineage between datasets. Note that you have to enable `Show Columns` to be able to see the column-level lineage.
<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/apis/tutorials/column-level-lineage-added.png"/>
</p>
## Read Lineage
<Tabs>
@ -180,7 +176,7 @@ query searchAcrossLineage {
}
```
This example shows using lineage degrees as a filter, but additional search filters can be included here as well.
This example shows using lineage degrees as a filter, but additional search filters can be included here as well.
</TabItem>
<TabItem value="curl" label="Curl">
@ -188,7 +184,7 @@ This example shows using lineage degrees as a filter, but additional search filt
```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 searchAcrossLineage { searchAcrossLineage( input: { query: \"*\" urn: \"urn:li:dataset:(urn:li:dataPlatform:dbt,long_tail_companions.adoption.human_profiles,PROD)\" start: 0 count: 10 direction: DOWNSTREAM orFilters: [ { and: [ { condition: EQUAL negated: false field: \"degree\" values: [\"1\", \"2\", \"3+\"] } ] } ] } ) { searchResults { degree entity { urn type } } }}"
--header 'Content-Type: application/json' --data-raw '{ { "query": "query searchAcrossLineage { searchAcrossLineage( input: { query: \"*\" urn: \"urn:li:dataset:(urn:li:dataPlatform:dbt,long_tail_companions.adoption.human_profiles,PROD)\" start: 0 count: 10 direction: DOWNSTREAM orFilters: [ { and: [ { condition: EQUAL negated: false field: \"degree\" values: [\"1\", \"2\", \"3+\"] } ] } ] } ) { searchResults { degree entity { urn type } } }}"
}}'
```

View File

@ -6,7 +6,7 @@ graph = DataHubGraph(DatahubClientConfig(server=gms_endpoint))
# Query multiple aspects from entity
query = """
mutation searchAcrossLineage {
query searchAcrossLineage {
searchAcrossLineage(
input: {
query: "*"