Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
KulykDmytro authored Oct 29, 2023
2 parents e653a9c + 9ae0e93 commit 7be777c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions datahub-web-react/src/app/home/HomePageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ export const HomePageHeader = () => {
viewsEnabled={viewsEnabled}
combineSiblings
showQuickFilters
showViewAllResults
/>
{searchResultsToShow && searchResultsToShow.length > 0 && (
<SuggestionsContainer>
Expand Down
6 changes: 4 additions & 2 deletions datahub-web-react/src/app/search/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ interface Props {
setIsSearchBarFocused?: (isSearchBarFocused: boolean) => void;
onFocus?: () => void;
onBlur?: () => void;
showViewAllResults?: boolean;
}

const defaultProps = {
Expand Down Expand Up @@ -146,6 +147,7 @@ export const SearchBar = ({
setIsSearchBarFocused,
onFocus,
onBlur,
showViewAllResults = false,
}: Props) => {
const history = useHistory();
const [searchQuery, setSearchQuery] = useState<string | undefined>(initialQuery);
Expand Down Expand Up @@ -203,7 +205,7 @@ export const SearchBar = ({
const { quickFilters, selectedQuickFilter, setSelectedQuickFilter } = useQuickFiltersContext();

const autoCompleteQueryOptions = useMemo(() => {
if (effectiveQuery === '') return [];
if (effectiveQuery === '' || !showViewAllResults) return [];

return [
{
Expand All @@ -212,7 +214,7 @@ export const SearchBar = ({
type: EXACT_AUTOCOMPLETE_OPTION_TYPE,
},
];
}, [effectiveQuery]);
}, [effectiveQuery, showViewAllResults]);

const autoCompleteEntityOptions = useMemo(() => {
return suggestions.map((suggestion: AutoCompleteResultForEntity) => {
Expand Down
1 change: 1 addition & 0 deletions datahub-web-react/src/app/search/SearchHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export const SearchHeader = ({
combineSiblings
fixAutoComplete
showQuickFilters
showViewAllResults
/>
</LogoSearchContainer>
<NavGroup>
Expand Down
8 changes: 2 additions & 6 deletions docs/api/tutorials/lineage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -180,15 +176,15 @@ 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">

```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 } } }}"
}}'
```

Expand Down
4 changes: 2 additions & 2 deletions docs/dev-guides/timeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ http://localhost:8080/openapi/timeline/v1/urn%3Ali%3Adataset%3A%28urn%3Ali%3Adat
REMOVE GLOSSARY_TERM dataset:hive:testTimelineDataset (urn:li:glossaryTerm:SavingsAccount): The GlossaryTerm 'SavingsAccount' for the entity 'urn:li:dataset:(urn:li:dataPlatform:hive,testTimelineDataset,PROD)' has been removed.
```

# Explore the API
## Explore the API

The API is browse-able via the UI through through the dropdown.
Here are a few screenshots showing how to navigate to it. You can try out the API and send example requests.
Expand All @@ -243,7 +243,7 @@ Here are a few screenshots showing how to navigate to it. You can try out the AP
</p>


# Future Work
## Future Work

- Supporting versions as start and end parameters as part of the call to the timeline API
- Supporting entities beyond Datasets
Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion/examples/library/read_lineage_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Query multiple aspects from entity
query = """
mutation searchAcrossLineage {
query searchAcrossLineage {
searchAcrossLineage(
input: {
query: "*"
Expand Down

0 comments on commit 7be777c

Please sign in to comment.