From c8340217e927d35672cc5b4851f27fc9ca12094f Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Mon, 14 Nov 2022 17:07:09 +0530 Subject: [PATCH] UI: Fixed UI | Table Detail pane on the Lineage tab doesn't show the column count #6947 (#8711) --- .../resources/ui/src/utils/EntityUtils.tsx | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx index 29bf37904af..c0c5e36655f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx @@ -21,6 +21,7 @@ import { ResourceEntity } from '../components/PermissionProvider/PermissionProvi import { FQN_SEPARATOR_CHAR } from '../constants/char.constants'; import { getDatabaseDetailsPath, + getDatabaseSchemaDetailsPath, getServiceDetailsPath, getTableDetailsPath, getTeamAndUserDetailsPath, @@ -91,11 +92,17 @@ export const getEntityOverview = ( }> => { switch (type) { case EntityType.TABLE: { - const { fullyQualifiedName, owner, tags, usageSummary, profile } = - entityDetail as Table; - const [service, database] = getPartialNameFromTableFQN( + const { + fullyQualifiedName, + owner, + tags, + usageSummary, + profile, + columns, + } = entityDetail as Table; + const [service, database, schema] = getPartialNameFromTableFQN( fullyQualifiedName ?? '', - [FqnPart.Service, FqnPart.Database], + [FqnPart.Service, FqnPart.Database, FqnPart.Schema], FQN_SEPARATOR_CHAR ).split(FQN_SEPARATOR_CHAR); const tier = getTierFromTableTags(tags || []); @@ -126,6 +133,18 @@ export const getEntityOverview = ( ), isLink: true, }, + { + name: 'Schema', + value: schema, + url: getDatabaseSchemaDetailsPath( + getPartialNameFromTableFQN( + fullyQualifiedName ?? '', + [FqnPart.Service, FqnPart.Database, FqnPart.Schema], + FQN_SEPARATOR_CHAR + ) + ), + isLink: true, + }, { name: 'Owner', value: getEntityName(owner) || '--', @@ -149,7 +168,7 @@ export const getEntityOverview = ( }, { name: 'Columns', - value: profile && profile?.columnCount ? profile.columnCount : '--', + value: columns ? columns.length : '--', isLink: false, }, {