mirror of
https://github.com/datahub-project/datahub.git
synced 2025-06-27 05:03:31 +00:00
docs(graphql): Correct mutation -> query for searchAcrossLineage examples (#9134)
This commit is contained in:
parent
aceff13ebb
commit
9ae0e93d82
@ -113,12 +113,10 @@ Expected Response:
|
|||||||
|
|
||||||
You can now see the lineage between `fct_users_deleted` and `logging_events`.
|
You can now see the lineage between `fct_users_deleted` and `logging_events`.
|
||||||
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/apis/tutorials/lineage-added.png"/>
|
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/apis/tutorials/lineage-added.png"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
## Add Column-level Lineage
|
## Add Column-level Lineage
|
||||||
|
|
||||||
<Tabs>
|
<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.
|
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">
|
<p align="center">
|
||||||
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/apis/tutorials/column-level-lineage-added.png"/>
|
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/apis/tutorials/column-level-lineage-added.png"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
## Read Lineage
|
## Read Lineage
|
||||||
|
|
||||||
<Tabs>
|
<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>
|
||||||
<TabItem value="curl" label="Curl">
|
<TabItem value="curl" label="Curl">
|
||||||
@ -188,7 +184,7 @@ This example shows using lineage degrees as a filter, but additional search filt
|
|||||||
```shell
|
```shell
|
||||||
curl --location --request POST 'http://localhost:8080/api/graphql' \
|
curl --location --request POST 'http://localhost:8080/api/graphql' \
|
||||||
--header 'Authorization: Bearer <my-access-token>' \
|
--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 } } }}"
|
||||||
}}'
|
}}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ graph = DataHubGraph(DatahubClientConfig(server=gms_endpoint))
|
|||||||
|
|
||||||
# Query multiple aspects from entity
|
# Query multiple aspects from entity
|
||||||
query = """
|
query = """
|
||||||
mutation searchAcrossLineage {
|
query searchAcrossLineage {
|
||||||
searchAcrossLineage(
|
searchAcrossLineage(
|
||||||
input: {
|
input: {
|
||||||
query: "*"
|
query: "*"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user