Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/linkedin/datahub
Browse files Browse the repository at this point in the history
  • Loading branch information
Dexter Lee committed Feb 10, 2022
2 parents 4573b6e + 9bdc9af commit 1b8ebb3
Show file tree
Hide file tree
Showing 23 changed files with 311 additions and 58 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Here are the companies that have officially adopted DataHub. Please feel free to
- [Experius](https://www.experius.nl)
- [Geotab](https://www.geotab.com)
- [Grofers](https://grofers.com)
- [Haibo Technology](https://www.botech.com.cn)
- [hipages](https://hipages.com.au/)
- [IOMED](https://iomed.health)
- [Klarna](https://www.klarna.com)
Expand All @@ -128,7 +129,8 @@ Here are the companies that have officially adopted DataHub. Please feel free to
- [Uphold](https://uphold.com)
- [Viasat](https://viasat.com)
- [Wolt](https://wolt.com)
- [Haibo Technology](https://www.botech.com.cn)
- [Zynga](https://www.zynga.com)


## Select Articles & Talks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ public CorpUser update(@Nonnull String urn, @Nonnull CorpUserUpdateInput input,

private RecordTemplate mapCorpUserEditableInfo(CorpUserUpdateInput input, Optional<CorpUserEditableInfo> existing) {
CorpUserEditableInfo result = existing.orElseGet(() -> new CorpUserEditableInfo());
if (input.getDisplayName() != null) {
result.setDisplayName(input.getDisplayName());
}
if (input.getAboutMe() != null) {
result.setAboutMe(input.getAboutMe());
}
Expand All @@ -162,6 +165,9 @@ private RecordTemplate mapCorpUserEditableInfo(CorpUserUpdateInput input, Option
if (input.getEmail() != null) {
result.setEmail(input.getEmail());
}
if (input.getTitle() != null) {
result.setTitle(input.getTitle());
}

return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public static CorpUserEditableProperties map(@Nonnull final com.linkedin.identit
@Override
public CorpUserEditableProperties apply(@Nonnull final com.linkedin.identity.CorpUserEditableInfo info) {
final CorpUserEditableProperties result = new CorpUserEditableProperties();
result.setDisplayName(info.getDisplayName());
result.setTitle(info.getTitle());
result.setAboutMe(info.getAboutMe());
result.setSkills(info.getSkills());
result.setTeams(info.getTeams());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public static CorpUserProperties map(@Nonnull final com.linkedin.identity.CorpUs
@Override
public CorpUserProperties apply(@Nonnull final com.linkedin.identity.CorpUserInfo info) {
final CorpUserProperties result = new CorpUserProperties();
result.setDisplayName(info.getDisplayName());
result.setTitle(info.getTitle());
result.setActive(info.isActive());
result.setCountryCode(info.getCountryCode());
result.setDepartmentId(info.getDepartmentId());
Expand Down
30 changes: 30 additions & 0 deletions datahub-graphql-core/src/main/resources/entity.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2217,6 +2217,16 @@ Deprecated, use CorpUserEditableProperties instead
Additional read write info about a user
"""
type CorpUserEditableInfo {
"""
Display name to show on DataHub
"""
displayName: String

"""
Title to show on DataHub
"""
title: String

"""
About me section of the user
"""
Expand All @@ -2242,6 +2252,16 @@ type CorpUserEditableInfo {
Additional read write properties about a user
"""
type CorpUserEditableProperties {
"""
Display name to show on DataHub
"""
displayName: String

"""
Title to show on DataHub
"""
title: String

"""
About me section of the user
"""
Expand Down Expand Up @@ -2283,6 +2303,16 @@ type CorpUserEditableProperties {
Arguments provided to update a CorpUser Entity
"""
input CorpUserUpdateInput {
"""
Display name to show on DataHub
"""
displayName: String

"""
Title to show on DataHub
"""
title: String

"""
About me section of the user
"""
Expand Down
25 changes: 18 additions & 7 deletions datahub-web-react/src/app/shared/tags/AddTagTermModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ import { message, Button, Modal, Select, Typography } from 'antd';
import styled from 'styled-components';

import { useGetSearchResultsLazyQuery } from '../../../graphql/search.generated';
import { GlobalTags, EntityType, GlossaryTerms, SubResourceType, SearchResult } from '../../../types.generated';
import {
GlobalTags,
EntityType,
GlossaryTerms,
SubResourceType,
SearchResult,
Tag,
GlossaryTerm,
} from '../../../types.generated';
import CreateTagModal from './CreateTagModal';
import { useEntityRegistry } from '../../useEntityRegistry';
import { IconStyleType } from '../../entity/Entity';
Expand Down Expand Up @@ -75,15 +83,15 @@ export default function AddTagTermModal({
const entityRegistry = useEntityRegistry();
const [addTagMutation] = useAddTagMutation();
const [addTermMutation] = useAddTermMutation();
const [tagSearch, { data: tagSearchData }] = useGetSearchResultsLazyQuery();
const tagSearchResults = tagSearchData?.search?.searchResults || [];
const [tagTermSearch, { data: tagTermSearchData }] = useGetSearchResultsLazyQuery();
const tagSearchResults = tagTermSearchData?.search?.searchResults || [];

const handleSearch = (text: string) => {
if (text.length > 0) {
tagSearch({
tagTermSearch({
variables: {
input: {
type: EntityType.Tag,
type,
query: text,
start: 0,
count: 10,
Expand All @@ -94,7 +102,10 @@ export default function AddTagTermModal({
};

const renderSearchResult = (result: SearchResult) => {
const displayName = entityRegistry.getDisplayName(result.entity.type, result.entity);
const displayName =
result.entity.type === EntityType.Tag
? (result.entity as Tag).name
: (result.entity as GlossaryTerm).hierarchicalName;
const item = renderItem(
displayName,
entityRegistry.getIcon(result.entity.type, 14, IconStyleType.ACCENT),
Expand Down Expand Up @@ -137,7 +148,7 @@ export default function AddTagTermModal({
}
if (selectedType === EntityType.GlossaryTerm) {
mutation = addTermMutation;
if (glossaryTerms?.terms?.some((term) => term.term.name === selectedName)) {
if (glossaryTerms?.terms?.some((term) => term.term.hierarchicalName === selectedName)) {
onClose();
return;
}
Expand Down
1 change: 1 addition & 0 deletions datahub-web-react/src/graphql/search.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ fragment searchResults on SearchResults {
}
... on GlossaryTerm {
name
hierarchicalName
glossaryTermInfo {
definition
termSource
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs-website/src/components/Logos.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ const companyLogos = [
imageUrl: "/img/logos/companies/saxobank.svg",
size: "default",
},
{
name: "Zynga",
imageUrl: "/img/logos/companies/zynga.png",
size: "default",
},
{
name: "Grofers",
imageUrl: "/img/logos/companies/grofers.png",
Expand Down Expand Up @@ -181,6 +186,10 @@ const platformLogos = [
name: "Superset",
imageUrl: "/img/logos/platforms/superset.svg",
},
{
name: "Tableau",
imageUrl: "/img/logos/platforms/tableau.png",
},
{
name: "Teradata",
imageUrl: "/img/logos/platforms/teradata.svg",
Expand Down
Binary file added docs-website/static/img/logos/companies/zynga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ def get_long_description():
"lookml": looker_common
| {"lkml>=1.1.2", "sql-metadata==2.2.2", "sqllineage==1.3.3"},
"metabase": {"requests", "sqllineage==1.3.3"},
"mode": {"requests", "sqllineage==1.3.3"},
"mongodb": {"pymongo>=3.11"},
"mode": {"requests", "sqllineage==1.3.3", "tenacity>=8.0.1"},
"mongodb": {"pymongo>=3.11", "packaging"},
"mssql": sql_common | {"sqlalchemy-pytds>=0.3"},
"mssql-odbc": sql_common | {"pyodbc"},
"mysql": sql_common | {"pymysql>=1.0.2"},
Expand All @@ -141,16 +141,16 @@ def get_long_description():
"redshift": sql_common
| {"sqlalchemy-redshift", "psycopg2-binary", "GeoAlchemy2", "sqllineage==1.3.3"},
"redshift-usage": sql_common
| {"sqlalchemy-redshift", "psycopg2-binary", "GeoAlchemy2"},
| {"sqlalchemy-redshift", "psycopg2-binary", "GeoAlchemy2", "sqllineage==1.3.3"},
"sagemaker": aws_common,
"snowflake": snowflake_common,
"snowflake-usage": snowflake_common | {"more-itertools>=8.12.0"},
"sqlalchemy": sql_common,
"superset": {"requests"},
"superset": {"requests", "sqlalchemy", "great_expectations"},
"tableau": {"tableauserverclient>=0.17.0"},
"trino": sql_common | {"trino"},
"starburst-trino-usage": sql_common | {"trino"},
"nifi": {"requests"},
"nifi": {"requests", "packaging"},
}

all_exclude_plugins: Set[str] = {
Expand Down
Loading

0 comments on commit 1b8ebb3

Please sign in to comment.