diff --git a/README.md b/README.md index ccaec2f57cf1e..0db06d29eac78 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,13 @@ HOSTED_DOCS_ONLY-->

-# DataHub: The Metadata Platform for the Modern Data Stack +# DataHub: The Data Discovery Platform for the Modern Data Stack ## Built with ❤️ by [Acryl Data](https://acryldata.io) and [LinkedIn](https://engineering.linkedin.com) [![Version](https://img.shields.io/github/v/release/datahub-project/datahub?include_prereleases)](https://github.com/datahub-project/datahub/releases/latest) [![PyPI version](https://badge.fury.io/py/acryl-datahub.svg)](https://badge.fury.io/py/acryl-datahub) [![build & test](https://github.com/datahub-project/datahub/workflows/build%20&%20test/badge.svg?branch=master&event=push)](https://github.com/datahub-project/datahub/actions?query=workflow%3A%22build+%26+test%22+branch%3Amaster+event%3Apush) [![Docker Pulls](https://img.shields.io/docker/pulls/acryldata/datahub-gms.svg)](https://hub.docker.com/r/acryldata/datahub-gms) -[![Slack](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://slack.datahubproject.io) +[![Slack](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://datahubproject.io/slack?utm_source=docs&utm_medium=docs&utm_campaign=docs_page_link) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/datahub-project/datahub/blob/master/docs/CONTRIBUTING.md) [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/datahub-project/datahub)](https://github.com/datahub-project/datahub/pulls?q=is%3Apr) [![License](https://img.shields.io/github/license/datahub-project/datahub)](https://github.com/datahub-project/datahub/blob/master/LICENSE) @@ -61,7 +61,7 @@ HOSTED_DOCS_ONLY--> ## Introduction -DataHub is an open-source metadata platform for the modern data stack. Read about the architectures of different metadata systems and why DataHub excels [here](https://engineering.linkedin.com/blog/2020/datahub-popular-metadata-architectures-explained). Also read our +DataHub is an open-source data catalog for the modern data stack. Read about the architectures of different metadata systems and why DataHub excels [here](https://engineering.linkedin.com/blog/2020/datahub-popular-metadata-architectures-explained). Also read our [LinkedIn Engineering blog post](https://engineering.linkedin.com/blog/2019/data-hub), check out our [Strata presentation](https://speakerdeck.com/shirshanka/the-evolution-of-metadata-linkedins-journey-strata-nyc-2019) and watch our [Crunch Conference Talk](https://www.youtube.com/watch?v=OB-O0Y6OYDE). You should also visit [DataHub Architecture](docs/architecture/architecture.md) to get a better understanding of how DataHub is implemented. ## Features & Roadmap @@ -106,7 +106,7 @@ We welcome contributions from the community. Please refer to our [Contributing G ## Community -Join our [Slack workspace](https://slack.datahubproject.io) for discussions and important announcements. You can also find out more about our upcoming [town hall meetings](docs/townhalls.md) and view past recordings. +Join our [Slack workspace](https://datahubproject.io/slack?utm_source=docs&utm_medium=docs&utm_campaign=docs_page_link) for discussions and important announcements. You can also find out more about our upcoming [town hall meetings](docs/townhalls.md) and view past recordings. ## Adoption diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/AggregateAcrossEntitiesResolver.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/AggregateAcrossEntitiesResolver.java index 4f54c949a7ff2..783789c738de0 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/AggregateAcrossEntitiesResolver.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/AggregateAcrossEntitiesResolver.java @@ -20,6 +20,7 @@ import com.linkedin.view.DataHubViewInfo; import graphql.schema.DataFetcher; import graphql.schema.DataFetchingEnvironment; +import java.util.ArrayList; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; @@ -68,15 +69,21 @@ public CompletableFuture get(DataFetchingEnvironment environme final List facets = input.getFacets() != null && input.getFacets().size() > 0 ? input.getFacets() : null; + List finalEntities = + maybeResolvedView != null + ? SearchUtils.intersectEntityTypes( + entityNames, maybeResolvedView.getDefinition().getEntityTypes()) + : entityNames; + if (finalEntities.size() == 0) { + return createEmptyAggregateResults(); + } + try { return mapAggregateResults( context, _entityClient.searchAcrossEntities( context.getOperationContext().withSearchFlags(flags -> searchFlags), - maybeResolvedView != null - ? SearchUtils.intersectEntityTypes( - entityNames, maybeResolvedView.getDefinition().getEntityTypes()) - : entityNames, + finalEntities, sanitizedQuery, maybeResolvedView != null ? SearchUtils.combineFilters( @@ -112,4 +119,10 @@ static AggregateResults mapAggregateResults( return results; } + + AggregateResults createEmptyAggregateResults() { + final AggregateResults result = new AggregateResults(); + result.setFacets(new ArrayList<>()); + return result; + } } diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchAcrossEntitiesResolver.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchAcrossEntitiesResolver.java index 31c11b9ac4c51..88e5dd0a94f0b 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchAcrossEntitiesResolver.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchAcrossEntitiesResolver.java @@ -75,14 +75,20 @@ public CompletableFuture get(DataFetchingEnvironment environment) start, count); + List finalEntities = + maybeResolvedView != null + ? SearchUtils.intersectEntityTypes( + entityNames, maybeResolvedView.getDefinition().getEntityTypes()) + : entityNames; + if (finalEntities.size() == 0) { + return SearchUtils.createEmptySearchResults(start, count); + } + return UrnSearchResultsMapper.map( context, _entityClient.searchAcrossEntities( context.getOperationContext().withSearchFlags(flags -> searchFlags), - maybeResolvedView != null - ? SearchUtils.intersectEntityTypes( - entityNames, maybeResolvedView.getDefinition().getEntityTypes()) - : entityNames, + finalEntities, sanitizedQuery, maybeResolvedView != null ? SearchUtils.combineFilters( diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchUtils.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchUtils.java index 0b298fd503c30..04777c3fcdb4e 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchUtils.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchUtils.java @@ -21,6 +21,7 @@ import com.linkedin.datahub.graphql.QueryContext; import com.linkedin.datahub.graphql.generated.EntityType; import com.linkedin.datahub.graphql.generated.FacetFilterInput; +import com.linkedin.datahub.graphql.generated.SearchResults; import com.linkedin.datahub.graphql.types.common.mappers.SearchFlagsInputMapper; import com.linkedin.datahub.graphql.types.entitytype.EntityTypeMapper; import com.linkedin.metadata.query.SearchFlags; @@ -314,4 +315,15 @@ public static List getEntityNames(List inputTypes) { (inputTypes == null || inputTypes.isEmpty()) ? SEARCHABLE_ENTITY_TYPES : inputTypes; return entityTypes.stream().map(EntityTypeMapper::getName).collect(Collectors.toList()); } + + public static SearchResults createEmptySearchResults(final int start, final int count) { + final SearchResults result = new SearchResults(); + result.setStart(start); + result.setCount(count); + result.setTotal(0); + result.setSearchResults(new ArrayList<>()); + result.setSuggestions(new ArrayList<>()); + result.setFacets(new ArrayList<>()); + return result; + } } diff --git a/docs-website/docusaurus.config.js b/docs-website/docusaurus.config.js index e219241230eb5..c6e298728e07f 100644 --- a/docs-website/docusaurus.config.js +++ b/docs-website/docusaurus.config.js @@ -320,6 +320,10 @@ module.exports = { if (existingPath.includes('/docs')) { return [ existingPath.replace('/docs', '/docs/next'), + existingPath.replace('/docs', '/docs/0.13.0'), + existingPath.replace('/docs', '/docs/0.12.1'), + existingPath.replace('/docs', '/docs/0.11.0'), + existingPath.replace('/docs', '/docs/0.10.5'), ]; } return undefined; // Return a falsy value: no redirect created diff --git a/docs-website/src/components/SlackUtm/index.js b/docs-website/src/components/SlackUtm/index.js new file mode 100644 index 0000000000000..c544102391c15 --- /dev/null +++ b/docs-website/src/components/SlackUtm/index.js @@ -0,0 +1,17 @@ +import React, { useState, useMemo } from "react"; +import styles from "./styles.module.scss"; +import { LikeOutlined, DislikeOutlined, CheckCircleOutlined } from "@ant-design/icons"; +import { v4 as uuidv4 } from "uuid"; + +const SlackUtm = ({ pageId }) => { + return ( +
+
+
+ Need more help? Join the conversation in Slack! +
+
+ ); +}; + +export default SlackUtm; diff --git a/docs-website/src/components/SlackUtm/styles.module.scss b/docs-website/src/components/SlackUtm/styles.module.scss new file mode 100644 index 0000000000000..b1e8938dc9d08 --- /dev/null +++ b/docs-website/src/components/SlackUtm/styles.module.scss @@ -0,0 +1,3 @@ +.slackUtm { + padding: 0.5rem 0rem; +} \ No newline at end of file diff --git a/docs-website/src/pages/_components/CardCTAs/index.js b/docs-website/src/pages/_components/CardCTAs/index.js index b173101de66f5..dc1b148d24bcd 100644 --- a/docs-website/src/pages/_components/CardCTAs/index.js +++ b/docs-website/src/pages/_components/CardCTAs/index.js @@ -12,12 +12,12 @@ const cardsContent = [ }, { label: "Data Contracts", - title: "End-to-end Reliability in Data", + title: "Data Contracts: End-to-end Reliability in Data", url: "https://www.acryldata.io/blog/data-contracts-in-datahub-combining-verifiability-with-holistic-data-management?utm_source=datahub&utm_medium=referral&utm_content=blog", }, { label: "Shift Left", - title: "Developer-friendly Data Governance", + title: "Data Governance and Lineage Impact Analysis", url: "https://www.acryldata.io/blog/the-3-must-haves-of-metadata-management-part-2?utm_source=datahub&utm_medium=referral&utm_content=blog", }, ]; diff --git a/docs-website/src/pages/_components/Hero/index.js b/docs-website/src/pages/_components/Hero/index.js index cb359ce92b789..17e5d0e7f4966 100644 --- a/docs-website/src/pages/_components/Hero/index.js +++ b/docs-website/src/pages/_components/Hero/index.js @@ -31,7 +31,7 @@ const Hero = ({}) => {

The #1 Open Source Metadata Platform

- DataHub is an extensible metadata platform that enables data discovery, data observability and federated governance to help tame the + DataHub is an extensible data catalog that enables data discovery, data observability and federated governance to help tame the complexity of your data ecosystem.

diff --git a/docs-website/src/pages/index.js b/docs-website/src/pages/index.js index 07345ac7100fa..68b177d10f7af 100644 --- a/docs-website/src/pages/index.js +++ b/docs-website/src/pages/index.js @@ -35,7 +35,7 @@ function Home() { return !siteConfig.customFields.isSaas ? ( @@ -70,9 +70,10 @@ function Home() { {/*


*/}

- Explore DataHub's journey from search and discovery tool at - LinkedIn to the #1 open source metadata platform, through the - lens of its founder and some amazing community members. + Explore DataHub's journey from search and data discovery tool at + LinkedIn to the #1 open source metadata management platform, + through the lens of its founder and some amazing community + members.

@@ -143,8 +144,8 @@ function Home() {

DataHub is the one-stop shop for documentation, schemas, - ownership, lineage, pipelines, data quality, usage information, - and more. + ownership, data lineage, pipelines, data quality, usage + information, and more.

diff --git a/docs-website/src/theme/DocItem/Footer/index.js b/docs-website/src/theme/DocItem/Footer/index.js index 94b6c7734f9ee..d6bc2c72914d5 100644 --- a/docs-website/src/theme/DocItem/Footer/index.js +++ b/docs-website/src/theme/DocItem/Footer/index.js @@ -7,6 +7,7 @@ import EditThisPage from "@theme/EditThisPage"; import TagsListInline from "@theme/TagsListInline"; import styles from "./styles.module.css"; import Feedback from "../../../components/Feedback"; +import SlackUtm from "../../../components/SlackUtm"; function TagsRow(props) { return ( @@ -42,6 +43,7 @@ export default function DocItemFooter() { return ( <>