UI: Fixed UI | Table Detail pane on the Lineage tab doesn't show the column count #6947 (#8711)

This commit is contained in:
Shailesh Parmar 2022-11-14 17:07:09 +05:30 committed by GitHub
parent 1abd869adc
commit c8340217e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,7 @@ import { ResourceEntity } from '../components/PermissionProvider/PermissionProvi
import { FQN_SEPARATOR_CHAR } from '../constants/char.constants'; import { FQN_SEPARATOR_CHAR } from '../constants/char.constants';
import { import {
getDatabaseDetailsPath, getDatabaseDetailsPath,
getDatabaseSchemaDetailsPath,
getServiceDetailsPath, getServiceDetailsPath,
getTableDetailsPath, getTableDetailsPath,
getTeamAndUserDetailsPath, getTeamAndUserDetailsPath,
@ -91,11 +92,17 @@ export const getEntityOverview = (
}> => { }> => {
switch (type) { switch (type) {
case EntityType.TABLE: { case EntityType.TABLE: {
const { fullyQualifiedName, owner, tags, usageSummary, profile } = const {
entityDetail as Table; fullyQualifiedName,
const [service, database] = getPartialNameFromTableFQN( owner,
tags,
usageSummary,
profile,
columns,
} = entityDetail as Table;
const [service, database, schema] = getPartialNameFromTableFQN(
fullyQualifiedName ?? '', fullyQualifiedName ?? '',
[FqnPart.Service, FqnPart.Database], [FqnPart.Service, FqnPart.Database, FqnPart.Schema],
FQN_SEPARATOR_CHAR FQN_SEPARATOR_CHAR
).split(FQN_SEPARATOR_CHAR); ).split(FQN_SEPARATOR_CHAR);
const tier = getTierFromTableTags(tags || []); const tier = getTierFromTableTags(tags || []);
@ -126,6 +133,18 @@ export const getEntityOverview = (
), ),
isLink: true, isLink: true,
}, },
{
name: 'Schema',
value: schema,
url: getDatabaseSchemaDetailsPath(
getPartialNameFromTableFQN(
fullyQualifiedName ?? '',
[FqnPart.Service, FqnPart.Database, FqnPart.Schema],
FQN_SEPARATOR_CHAR
)
),
isLink: true,
},
{ {
name: 'Owner', name: 'Owner',
value: getEntityName(owner) || '--', value: getEntityName(owner) || '--',
@ -149,7 +168,7 @@ export const getEntityOverview = (
}, },
{ {
name: 'Columns', name: 'Columns',
value: profile && profile?.columnCount ? profile.columnCount : '--', value: columns ? columns.length : '--',
isLink: false, isLink: false,
}, },
{ {