Skip to content

Commit

Permalink
Fix #3051: Glossary-term suggest api has fqdn same as name
Browse files Browse the repository at this point in the history
  • Loading branch information
harshach committed Mar 1, 2022
1 parent c65cdbb commit a5b6de4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ public static GlossaryTermESIndexBuilder builder(GlossaryTerm glossaryTerm, Even
.name(glossaryTerm.getName())
.displayName(displayName)
.description(description)
.fqdn(glossaryTerm.getName())
.fqdn(glossaryTerm.getFullyQualifiedName())
.glossaryId(glossaryTerm.getGlossary().getId().toString())
.glossaryName(glossaryTerm.getGlossary().getName())
.lastUpdatedTimestamp(updatedTimestamp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"owner": {
"type": "keyword"
},
"fqdn": {
"type": "keyword"
},
"last_updated_timestamp": {
"type": "date",
"format": "epoch_second"
Expand Down
1 change: 1 addition & 0 deletions ingestion/src/metadata/ingestion/models/table_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class GlossaryTermESDocument(BaseModel):
entity_type: str = "glossaryTerm"
name: str
display_name: str
fqdn: str
description: str
glossary_name: str
glossary_id: str
Expand Down
3 changes: 1 addition & 2 deletions ingestion/src/metadata/ingestion/sink/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
import json
import logging
import ssl
import time
import traceback
from datetime import datetime
from typing import List, Optional

from dateutil import parser
from elasticsearch import Elasticsearch
from elasticsearch.connection import create_ssl_context

Expand Down Expand Up @@ -578,6 +576,7 @@ def _create_glossary_term_es_doc(self, glossary_term: GlossaryTerm):
deleted=glossary_term.deleted,
name=glossary_term.name.__root__,
display_name=glossary_term.displayName,
fqdn=glossary_term.fullyQualifiedName,
description=glossary_term.description,
glossary_id=str(glossary_term.glossary.id.__root__),
glossary_name=glossary_term.glossary.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@
"display_name": {
"type": "text"
},
"fqdn": {
"type": "keyword"
},
"owner": {
"type": "keyword"
},
Expand Down

0 comments on commit a5b6de4

Please sign in to comment.