mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 21:16:45 +00:00
This commit is contained in:
parent
254b0b64d1
commit
0dd177ac2c
@ -235,6 +235,7 @@ class TeamESDocument(BaseModel):
|
||||
fullyQualifiedName: str
|
||||
displayName: str
|
||||
description: str
|
||||
teamType: str
|
||||
version: float
|
||||
updatedAt: Optional[int]
|
||||
updatedBy: Optional[str]
|
||||
|
||||
@ -684,6 +684,7 @@ class ElasticsearchSink(Sink[Entity]):
|
||||
name=team.name.__root__,
|
||||
displayName=team.displayName if team.displayName else team.name.__root__,
|
||||
description=team.description.__root__ if team.description else "",
|
||||
teamType=team.teamType.name,
|
||||
fullyQualifiedName=team.fullyQualifiedName.__root__,
|
||||
version=team.version.__root__,
|
||||
updatedAt=team.updatedAt.__root__,
|
||||
@ -693,6 +694,7 @@ class ElasticsearchSink(Sink[Entity]):
|
||||
suggest=suggest,
|
||||
users=team.users if team.users else [],
|
||||
defaultRoles=team.defaultRoles if team.defaultRoles else [],
|
||||
parents=team.parents if team.parents else [],
|
||||
isJoinable=team.isJoinable,
|
||||
)
|
||||
|
||||
|
||||
@ -29,6 +29,9 @@ TEAM_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
|
||||
}
|
||||
}
|
||||
},
|
||||
"teamType": {
|
||||
"type": "text"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
@ -82,6 +85,43 @@ TEAM_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
|
||||
}
|
||||
}
|
||||
},
|
||||
"parents": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "keyword",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 36
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"name": {
|
||||
"type": "keyword",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
}
|
||||
},
|
||||
"fullyQualifiedName": {
|
||||
"type": "text"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"deleted": {
|
||||
"type": "text"
|
||||
},
|
||||
"href": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultRoles": {
|
||||
"properties": {
|
||||
"id": {
|
||||
|
||||
@ -134,7 +134,7 @@ class MetadataSource(Source[Entity]):
|
||||
if self.service_connection.includeTeams:
|
||||
yield from self.fetch_entities(
|
||||
entity_class=Team,
|
||||
fields=["users", "owns"],
|
||||
fields=["users", "owns", "parents"],
|
||||
)
|
||||
|
||||
if self.service_connection.includeGlossaryTerms:
|
||||
|
||||
@ -9,7 +9,7 @@ import org.openmetadata.service.util.JsonUtils;
|
||||
|
||||
public class TeamIndex implements ElasticSearchIndex {
|
||||
Team team;
|
||||
final List<String> excludeFields = List.of("owns", "changeDescription");
|
||||
final List<String> excludeFields = List.of("owns", "changeDescription", "roles", "inheritedRoles");
|
||||
|
||||
public TeamIndex(Team team) {
|
||||
this.team = team;
|
||||
|
||||
@ -22,6 +22,9 @@
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"teamType": {
|
||||
"type": "text"
|
||||
},
|
||||
"version": {
|
||||
"type": "float"
|
||||
},
|
||||
@ -72,6 +75,43 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"parents": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "keyword",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 36
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"name": {
|
||||
"type": "keyword",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
}
|
||||
},
|
||||
"fullyQualifiedName": {
|
||||
"type": "text"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"deleted": {
|
||||
"type": "text"
|
||||
},
|
||||
"href": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultRoles": {
|
||||
"properties": {
|
||||
"id": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user