Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable relation between glossary term and datasets searchable #2806

Merged
merged 6 commits into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.linkedin.datahub.graphql.types.dataset.mappers;

import com.linkedin.common.GlobalTags;

import com.linkedin.common.GlossaryTerms;
import com.linkedin.common.InstitutionalMemory;
import com.linkedin.common.Ownership;
import com.linkedin.common.Status;
Expand All @@ -14,6 +14,7 @@
import com.linkedin.datahub.graphql.types.common.mappers.OwnershipMapper;
import com.linkedin.datahub.graphql.types.common.mappers.StatusMapper;
import com.linkedin.datahub.graphql.types.common.mappers.StringMapMapper;
import com.linkedin.datahub.graphql.types.glossary.mappers.GlossaryTermsMapper;
import com.linkedin.datahub.graphql.types.mappers.ModelMapper;
import com.linkedin.datahub.graphql.types.tag.mappers.GlobalTagsMapper;
import com.linkedin.dataset.DatasetDeprecation;
Expand Down Expand Up @@ -82,6 +83,8 @@ public Dataset apply(@Nonnull final DatasetSnapshot dataset) {
result.setGlobalTags(GlobalTagsMapper.map((GlobalTags) aspect));
} else if (aspect instanceof EditableSchemaMetadata) {
result.setEditableSchemaMetadata(EditableSchemaMetadataMapper.map((EditableSchemaMetadata) aspect));
} else if (aspect instanceof GlossaryTerms) {
result.setGlossaryTerms(GlossaryTermsMapper.map((GlossaryTerms) aspect));
} else if (aspect instanceof EditableDatasetProperties) {
final EditableDatasetProperties editableDatasetProperties = (EditableDatasetProperties) aspect;
final DatasetEditableProperties editableProperties = new DatasetEditableProperties();
Expand Down
4 changes: 4 additions & 0 deletions metadata-ingestion/src/datahub/metadata/schema.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -2738,6 +2738,10 @@
"namespace": "com.linkedin.pegasus2avro.common",
"fields": [
{
"Searchable": {
"fieldName": "glossaryTerms",
"fieldType": "TEXT_PARTIAL"
},
"java": {
"class": "com.linkedin.pegasus2avro.common.urn.GlossaryTermUrn"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2700,6 +2700,10 @@
"name": "urn",
"type": "string",
"doc": "Urn of the applied glossary term",
"Searchable": {
"fieldName": "glossaryTerms",
"fieldType": "TEXT_PARTIAL"
},
"java": {
"class": "com.linkedin.pegasus2avro.common.urn.GlossaryTermUrn"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2699,6 +2699,10 @@
"name": "urn",
"type": "string",
"doc": "Urn of the applied glossary term",
"Searchable": {
"fieldName": "glossaryTerms",
"fieldType": "TEXT_PARTIAL"
},
"java": {
"class": "com.linkedin.pegasus2avro.common.urn.GlossaryTermUrn"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ record GlossaryTermAssociation {
/**
* Urn of the applied glossary term
*/
@Searchable = {
"fieldName": "glossaryTerms",
"fieldType": "TEXT_PARTIAL"
}
urn: GlossaryTermUrn
}