diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/icon-add-test.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/icon-add-test.svg
new file mode 100644
index 00000000000..e3a3ab82c2c
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/icon-add-test.svg
@@ -0,0 +1,17 @@
+
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.component.tsx
index a98fcfa287f..e3567a070d6 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.component.tsx
@@ -269,7 +269,7 @@ const DatasetDetails: React.FC = ({
position: 4,
},
{
- name: 'Profiler',
+ name: 'Profiler & Data Quality',
icon: {
alt: 'profiler',
name: 'icon-profiler',
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.test.tsx
index 92ab3126503..9d2cee47113 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.test.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.test.tsx
@@ -272,7 +272,7 @@ describe('Test MyDataDetailsPage page', () => {
const activityFeedTab = await findByTestId(tabs, 'Activity Feeds & Tasks');
const sampleDataTab = await findByTestId(tabs, 'Sample Data');
const queriesTab = await findByTestId(tabs, 'Queries');
- const profilerTab = await findByTestId(tabs, 'Profiler');
+ const profilerTab = await findByTestId(tabs, 'Profiler & Data Quality');
const lineageTab = await findByTestId(tabs, 'Lineage');
const dbtTab = queryByTestId(tabs, 'DBT');
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.test.tsx
index b937b8162d3..c963a5d715e 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.test.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.test.tsx
@@ -39,6 +39,9 @@ jest.mock('antd', () => ({
.mockImplementation(({ children, ...props }) => (
{children}
)),
+ Tooltip: jest
+ .fn()
+ .mockImplementation(({ children }) => {children}),
Table: jest.fn().mockImplementation(({ columns, dataSource }) => (
@@ -102,6 +105,7 @@ const mockProps: ColumnProfileTableProps = {
columns: MOCK_TABLE.columns,
onAddTestClick: jest.fn,
columnTests: [],
+ hasEditAccess: true,
};
describe('Test ColumnProfileTable component', () => {
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx
index 4c5b2bebce3..e3080c40d5b 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx
@@ -11,7 +11,7 @@
* limitations under the License.
*/
-import { Button, Space, Table } from 'antd';
+import { Button, Space, Table, Tooltip } from 'antd';
import { ColumnsType } from 'antd/lib/table';
import { isUndefined } from 'lodash';
import React, { FC, useEffect, useMemo, useState } from 'react';
@@ -21,6 +21,7 @@ import {
SECONDARY_COLOR,
SUCCESS_COLOR,
} from '../../../constants/constants';
+import { NO_PERMISSION_FOR_ACTION } from '../../../constants/HelperTextUtil';
import {
DEFAULT_TEST_VALUE,
INITIAL_TEST_RESULT_SUMMARY,
@@ -32,6 +33,7 @@ import {
getAddDataQualityTableTestPath,
getProfilerDashboardWithFqnPath,
} from '../../../utils/RouterUtils';
+import SVGIcons, { Icons } from '../../../utils/SvgUtils';
import Ellipses from '../../common/Ellipses/Ellipses';
import Searchbar from '../../common/searchbar/Searchbar';
import TestIndicator from '../../common/TestIndicator/TestIndicator';
@@ -43,6 +45,7 @@ import ProfilerProgressWidget from './ProfilerProgressWidget';
const ColumnProfileTable: FC = ({
columnTests,
+ hasEditAccess,
columns = [],
}) => {
const [searchText, setSearchText] = useState('');
@@ -125,11 +128,19 @@ const ColumnProfileTable: FC = ({
render: (profile: ColumnProfile) => profile?.valuesCount || 0,
},
{
- title: 'Test',
+ title: 'Tests',
+ dataIndex: 'Tests',
+ key: 'Tests',
+ render: (_, record) =>
+ columnTestSummary?.[record.fullyQualifiedName || '']?.count || 0,
+ },
+ {
+ title: 'Status',
dataIndex: 'dataQualityTest',
key: 'dataQualityTest',
render: (_, record) => {
- const summary = columnTestSummary?.[record.fullyQualifiedName || ''];
+ const summary =
+ columnTestSummary?.[record.fullyQualifiedName || '']?.results;
const currentResult = summary
? Object.entries(summary).map(([key, value]) => ({
value,
@@ -151,17 +162,28 @@ const ColumnProfileTable: FC = ({
dataIndex: 'actions',
key: 'actions',
render: (_, record) => (
-
-
-
+
+
+
+ }
+ type="link"
+ />
+
+
),
},
];
@@ -185,9 +207,13 @@ const ColumnProfileTable: FC = ({
const colResult = columnTests.reduce((acc, curr) => {
const fqn = curr.entityFQN || '';
if (isUndefined(acc[fqn])) {
- acc[fqn] = { ...INITIAL_TEST_RESULT_SUMMARY };
+ acc[fqn] = { results: { ...INITIAL_TEST_RESULT_SUMMARY }, count: 0 };
}
- updateTestResults(acc[fqn], curr.testCaseResult?.testCaseStatus || '');
+ updateTestResults(
+ acc[fqn].results,
+ curr.testCaseResult?.testCaseStatus || ''
+ );
+ acc[fqn].count += 1;
return acc;
}, {} as columnTestResultType);
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfiler.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfiler.interface.ts
index d2b8151727f..cec0b205192 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfiler.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfiler.interface.ts
@@ -34,10 +34,13 @@ export type TableTestsType = {
};
};
-export type columnTestResultType = { [key: string]: TableTestsType['results'] };
+export type columnTestResultType = {
+ [key: string]: { results: TableTestsType['results']; count: number };
+};
export interface ColumnProfileTableProps {
columns: Column[];
+ hasEditAccess: boolean;
columnTests: TestCase[];
onAddTestClick: (
tabValue: number,
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.tsx
index f48def1d92a..883c546c75c 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.tsx
@@ -176,7 +176,8 @@ const TableProfilerV1: FC = ({
/>
-
+
= ({
- }
- type="default"
- onClick={() => handleSettingModal(true)}>
- Settings
-
+
+ }
+ type="default"
+ onClick={() => handleSettingModal(true)}>
+ Settings
+
+
@@ -252,6 +257,7 @@ const TableProfilerV1: FC = ({
...col,
key: col.name,
}))}
+ hasEditAccess={hasEditAccess}
onAddTestClick={onAddTestClick}
/>
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/SvgUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/SvgUtils.tsx
index 6007f1ec70d..f345af29926 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/SvgUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/SvgUtils.tsx
@@ -111,6 +111,7 @@ import IconTrends from '../assets/svg/ic-trends.svg';
import IconUpArrow from '../assets/svg/ic-up-arrow.svg';
import IconVEllipsis from '../assets/svg/ic-v-ellipsis.svg';
import IconWorkflows from '../assets/svg/ic-workflows.svg';
+import IconAddTest from '../assets/svg/icon-add-test.svg';
import IconChevronDown from '../assets/svg/icon-chevron-down.svg';
import IconCopy from '../assets/svg/icon-copy.svg';
import IconDown from '../assets/svg/icon-down.svg';
@@ -228,6 +229,7 @@ export const Icons = {
LINEAGE: 'icon-lineage',
MANAGE: 'icon-manage',
HOME: 'icon-home',
+ ADD_TEST: 'icon-add-test',
GROWTH_ARROW: 'icon-growth-arrow',
LOSS_ARROW: 'icon-loss-arrow',
CHECK_CIRCLE: 'icon-check-circle',
@@ -420,6 +422,10 @@ const SVGIcons: FunctionComponent = ({
case Icons.LOGO_SMALL:
IconComponent = LogoMonogram;
+ break;
+ case Icons.ADD_TEST:
+ IconComponent = IconAddTest;
+
break;
case Icons.WELCOME_POPPER:
IconComponent = IconWelcomePopper;