Skip to content

feat: migrate Data quality dashboard to open source - #26765

Merged
ShaileshParmar11 merged 23 commits into
mainfrom
dq-dashboard-migrate
Mar 28, 2026
Merged

ShaileshParmar11 merged 23 commits into
mainfrom
dq-dashboard-migrate

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor
  • Updated Spanish, French, Galician, Hebrew, Japanese, Korean, Marathi, Dutch, Persian, Brazilian Portuguese, European Portuguese, Russian, Thai, Turkish, Simplified Chinese, and Traditional Chinese language files to include new keys for data dimensions, data health, incident metrics, and test case status.
  • Enhanced the Data Quality dashboard by integrating a new dashboard component and updating the sidebar to include a summary tab.
  • Modified Data Quality utility functions to support new test case status filtering and data transformation for improved reporting.
  • Introduced new styles for the dashboard and updated existing variables for better visual representation.

Fixes #26705
Fixes https://github.com/open-metadata/openmetadata-collate/issues/3250

Screen.Recording.2026-03-27.at.9.35.12.PM.mov

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

…atus translations in multiple languages

- Updated Spanish, French, Galician, Hebrew, Japanese, Korean, Marathi, Dutch, Persian, Brazilian Portuguese, European Portuguese, Russian, Thai, Turkish, Simplified Chinese, and Traditional Chinese language files to include new keys for data dimensions, data health, incident metrics, and test case status.
- Enhanced the Data Quality dashboard by integrating a new dashboard component and updating the sidebar to include a summary tab.
- Modified Data Quality utility functions to support new test case status filtering and data transformation for improved reporting.
- Introduced new styles for the dashboard and updated existing variables for better visual representation.
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Mar 25, 2026
- Updated Russian, Thai, Turkish, Simplified Chinese, and Traditional Chinese language files to include new keys for data dimensions, data health, incident metrics, and test case status.
- Added sub-header descriptions for data dimensions, data health, and incident metrics in respective language files.
- Refactored imports in DataQualityClassBase, TagPage, DomainClassBase, and GlossaryTermClassBase to maintain consistent import order and structure.
- Improved test cases in DomainClassBase, GlossaryTermClassBase, and TagClassBase for better readability and maintainability.
- Removed unnecessary lines in TagClassBase.test.ts and TagsUtils.tsx to clean up the code.
…efine search query logic in DataQualityDashboard
@ShaileshParmar11
ShaileshParmar11 marked this pull request as ready for review March 26, 2026 12:42
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner March 26, 2026 12:42
Copilot AI review requested due to automatic review settings March 26, 2026 12:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Data Quality experience by adding a new “Summary/Dashboard” view and surfacing “Data Observability” tabs on governance entities (Tags, Glossary Terms, Domains), alongside broad i18n updates for the new dashboard content.

Changes:

  • Adds a Data Quality dashboard “Summary” tab and left-sidebar entry, and makes it the default Data Quality landing tab.
  • Introduces a reusable DataQualityDashboard component plus multiple new chart widgets (pie/area/status cards) and supporting utilities/constants/styles.
  • Updates many locale JSONs with new keys for data dimensions, data health, incident metrics, and test case status.

Reviewed changes

Copilot reviewed 61 out of 61 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
openmetadata-ui/src/main/resources/ui/src/utils/TagClassBase.ts Adds DATA_OBSERVABILITY tab ID to tag detail tab set.
openmetadata-ui/src/main/resources/ui/src/utils/TagClassBase.test.ts Updates expectations for the new tab and mocks i18n util.
openmetadata-ui/src/main/resources/ui/src/utils/Glossary/GlossaryTermClassBase.ts Appends a Data Observability tab (DataQualityDashboard) to glossary term detail view.
openmetadata-ui/src/main/resources/ui/src/utils/Glossary/GlossaryTermClassBase.test.ts Adds tests for the new tab behavior and props passed to the dashboard.
openmetadata-ui/src/main/resources/ui/src/utils/Domain/DomainClassBase.ts Appends a Data Observability tab (DataQualityDashboard) to domain detail view.
openmetadata-ui/src/main/resources/ui/src/utils/Domain/DomainClassBase.test.ts Adds tests validating the new domain tab behavior and filters.
openmetadata-ui/src/main/resources/ui/src/utils/DataQuality/DataQualityUtils.tsx Adds helpers for dashboard navigation and status-by-dimension transformation and pie labels.
openmetadata-ui/src/main/resources/ui/src/styles/variables.less Introduces @green-100 used by new widget styles.
openmetadata-ui/src/main/resources/ui/src/pages/TagPage/tag-page.less Adds styling to size the new DQ tab pane.
openmetadata-ui/src/main/resources/ui/src/pages/TagPage/TagPage.tsx Adds Data Observability tab to Tag page and aligns tab keys with EntityTabs.
openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityClassBase.ts Adds “Summary” sidebar entry/tab and makes it the default.
openmetadata-ui/src/main/resources/ui/src/constants/DataQuality.constants.ts Adds dashboard header metadata, dimension defaults, and DQ filter key constants.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx New dashboard view with filter bar, cards, and chart grid.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.interface.ts New dashboard filter type(s).
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/data-quality-dashboard.style.less New styles for dashboard and governance embedding layout.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQuality.interface.ts Extends widget prop contracts to support new dashboard widgets.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/ChartWidgets.constants.ts Adds shared pie segment orders for consistent click→status mapping.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/chart-widgets.less Adds shared styling helpers for chart widgets.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/** Adds multiple new chart/widget components and corresponding unit tests.
openmetadata-ui/src/main/resources/ui/src/locale/languages/*.json Adds new translation keys across many supported locales.

@ShaileshParmar11 ShaileshParmar11 changed the title feat: Add data dimensions, health, incident metrics, and test case status translations in multiple languages feat: migrate Data quality dashboard to open source Mar 27, 2026
Copilot AI review requested due to automatic review settings March 28, 2026 06:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 66 out of 66 changed files in this pull request and generated 6 comments.

Comment on lines +14 to +20
import { TestCaseStatus } from '../../../generated/entity/feed/testCaseResult';

/** Segment order for TestCaseStatusPieChartWidget: Success, Failed, Aborted */
export const TEST_CASE_STATUS_PIE_SEGMENT_ORDER: TestCaseStatus[] = [
TestCaseStatus.Success,
TestCaseStatus.Failed,
TestCaseStatus.Aborted,

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This constants file imports TestCaseStatus from generated/entity/feed/testCaseResult, while DataQualityDashboard and DataQuality.interface.ts use TestCaseStatus from generated/tests/testCase. Mixing enum sources for the same concept tends to break typing (enums are not interchangeable) and can cascade into errors in widgets that consume these constants. Standardize on a single TestCaseStatus enum across the Data Quality dashboard widgets.

Copilot uses AI. Check for mistakes.
Comment on lines +692 to +696
/** Returns path and search for navigating to the Test Cases tab with a status filter. */
export const getTestCaseTabPath = (testCaseStatus: TestCaseStatus) => ({
pathname: getDataQualityPagePath(DataQualityPageTabs.TEST_CASES),
search: QueryString.stringify({ testCaseStatus }),
});

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getTestCaseTabPath is typed to accept TestCaseStatus from generated/entity/feed/testCaseResult, but other Data Quality code (e.g., DataQualityDashboard.component.tsx) uses TestCaseStatus from generated/tests/testCase. Since these enums are not assignable to each other in TypeScript, this can lead to type errors at call sites. Align the TestCaseStatus import here with the enum used across the Data Quality UI.

Copilot uses AI. Check for mistakes.
testCaseSummary.total
),
}),
[testCaseSummary]

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The useMemo that builds data/chartLabel uses t(...), but the dependency array only includes testCaseSummary. This can lead to stale labels if the language changes and can trigger react-hooks/exhaustive-deps lint warnings. Include t (and any other referenced values that can change) in the dependency array.

Suggested change
[testCaseSummary]
[testCaseSummary, t]

Copilot uses AI. Check for mistakes.
entityHealthStates.total
),
}),
[entityHealthStates]

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This useMemo computes translated labels via t(...), but the dependency array only includes entityHealthStates. That risks stale UI when the active language changes and may violate the repo's hooks linting. Add t (and any other changing references) to the dependency array.

Suggested change
[entityHealthStates]
[entityHealthStates, t]

Copilot uses AI. Check for mistakes.
dataAssetsCoverageStates.total
),
}),
[dataAssetsCoverageStates]

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This useMemo uses t(...) for segment labels, but the dependency array only includes dataAssetsCoverageStates. This can produce stale translations and can trip react-hooks/exhaustive-deps. Include t (and any other referenced values that can change) in the dependency array.

Suggested change
[dataAssetsCoverageStates]
[dataAssetsCoverageStates, t]

Copilot uses AI. Check for mistakes.
import { Link } from 'react-router-dom';
import { ReactComponent as SuccessIcon } from '../../../../assets/svg/ic-check.svg';
import { ReactComponent as FailedIcon } from '../../../../assets/svg/ic-warning-2.svg';
import { TestCaseStatus } from '../../../../generated/entity/feed/testCaseResult';

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestCaseStatusAreaChartWidgetProps (from DataQuality.interface.ts) uses TestCaseStatus from generated/tests/testCase, but this component imports TestCaseStatus from generated/entity/feed/testCaseResult. These are different enum types in TypeScript, which can cause TS compile errors and make comparisons like testCaseStatus === TestCaseStatus.Failed unreliable at the type level. Use the same TestCaseStatus enum source consistently (preferably the one used by DataQualityDashboard and the prop types).

Suggested change
import { TestCaseStatus } from '../../../../generated/entity/feed/testCaseResult';
import { TestCaseStatus } from '../../../../generated/tests/testCase';

Copilot uses AI. Check for mistakes.
@gitar-bot

gitar-bot Bot commented Mar 28, 2026 •

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 8 resolved / 10 findings

Data quality dashboard migration to open source addresses eight issues including UI rendering, translation coverage, and null-safety checks. Two minor findings remain: NO_DIMENSION constant mismatch with its enum and missing NaN guard on parseInt for document_count.

💡 Bug: NO_DIMENSION constant value mismatches the enum it shadows

📄 openmetadata-ui/src/main/resources/ui/src/constants/DataQuality.constants.ts:40

The exported constant NO_DIMENSION = 'No Dimension' (with a space) doesn't match DataQualityDimensions.NoDimension which is "NoDimension" (no space). While NO_DIMENSION isn't used in production code yet (only in a test mock where it's correctly overridden), this is a latent bug waiting to happen if someone uses this constant expecting it to equal the enum value.

Suggested fix
export const NO_DIMENSION = DataQualityDimensions.NoDimension;
💡 Edge Case: parseInt on document_count without NaN guard in transform

📄 openmetadata-ui/src/main/resources/ui/src/utils/DataQuality/DataQualityUtils.tsx:711

In transformToTestCaseStatusByDimension, parseInt(document_count, 10) is called without checking the result for NaN. If the API ever returns an item without a document_count field or with a non-numeric value, NaN will propagate through all the running totals (success, failed, aborted, total) for that dimension, silently corrupting the entire dimension's data. A simple || 0 fallback would make this robust.

Suggested fix
const count = parseInt(document_count, 10) || 0;
✅ 8 resolved
✅ Edge Case: Fixed height + overflow-y on all tab panes may cause double scrollbars

📄 openmetadata-ui/src/main/resources/ui/src/pages/TagPage/tag-page.less:22-23 📄 openmetadata-ui/src/main/resources/ui/src/pages/TagPage/TagPage.tsx:805-810
The new CSS in tag-page.less applies height: @tag-page-height; overflow-y: auto; to ALL .ant-tabs-tabpane children. However, the parent Col container in TagPage.tsx already sets overflowY: 'auto' and height: calc(100vh - 170px). This creates nested scrollable containers which can produce double scrollbars depending on the tab content (e.g., the Assets tab with ResizablePanels or the new DataQualityDashboard). The height calculation also differs between the CSS variable and the inline style, so the inner container may be taller or shorter than the outer one.

✅ Quality: Persian (pr-pr.json) translations are copy-pasted Arabic

📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json:2229-2231 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json:3131-3134
The new translation keys (data-health, incident-metrics, test-case-status, and all four *-sub-header messages) in pr-pr.json are identical to the Arabic (ar-sa.json) translations rather than actual Persian text. Persian uses a different script style and vocabulary. This will display Arabic text to Persian-speaking users.

✅ Quality: Several languages leave data-dimensions untranslated as English

📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json:2228 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json:2228 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json:2228 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json:2228 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json:2228 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json:2228 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json:2228 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json:2228 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json:2228
The data-dimensions label is left as the English string "Data Dimensions" in es-es, fr-fr, gl-es, he-he, ja-jp, nl-nl, pr-pr, ru-ru, th-th, and de-de locale files, while other keys in the same batch are properly translated. This appears to be an oversight in the translation pass.

✅ Quality: Module-level DEFAULT_RANGE_DATA constant has stale timestamps

📄 openmetadata-ui/src/main/resources/ui/src/constants/DataQuality.constants.ts:94-99
In DataQuality.constants.ts (lines 94-98), DEFAULT_RANGE_DATA calls getCurrentMillis() and getEpochMillisForPastDays() at module load time. If the module is imported early (e.g., during app bootstrap) and the constant is used much later, endTs will be stale. The dashboard component already works around this by using a local useMemo, but exporting this as a constant is misleading—any future consumer would get stale values. Consider converting it to a factory function (getDefaultRangeData()) or removing the export if unused.

✅ Bug: Default wildcard query becomes *** after wrapping

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx:245 📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx:248 📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx:297 📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx:300
When fetchTagOptions or fetchGlossaryTermOptions are called without arguments, query defaults to WILD_CARD_CHAR ('*'), so the constructed query becomes *${'*'}* → ***. While most search engines treat this the same as *, it's semantically unintended and could behave unexpectedly depending on the backend query parser.

Consider applying the wildcard wrapping only when the query is not already a wildcard:

...and 3 more resolved from earlier reviews

🤖 Prompt for agents
Code Review: Data quality dashboard migration to open source addresses eight issues including UI rendering, translation coverage, and null-safety checks. Two minor findings remain: NO_DIMENSION constant mismatch with its enum and missing NaN guard on parseInt for document_count.

1. 💡 Bug: NO_DIMENSION constant value mismatches the enum it shadows
   Files: openmetadata-ui/src/main/resources/ui/src/constants/DataQuality.constants.ts:40

   The exported constant `NO_DIMENSION = 'No Dimension'` (with a space) doesn't match `DataQualityDimensions.NoDimension` which is `"NoDimension"` (no space). While `NO_DIMENSION` isn't used in production code yet (only in a test mock where it's correctly overridden), this is a latent bug waiting to happen if someone uses this constant expecting it to equal the enum value.

   Suggested fix:
   export const NO_DIMENSION = DataQualityDimensions.NoDimension;

2. 💡 Edge Case: parseInt on document_count without NaN guard in transform
   Files: openmetadata-ui/src/main/resources/ui/src/utils/DataQuality/DataQualityUtils.tsx:711

   In `transformToTestCaseStatusByDimension`, `parseInt(document_count, 10)` is called without checking the result for `NaN`. If the API ever returns an item without a `document_count` field or with a non-numeric value, `NaN` will propagate through all the running totals (`success`, `failed`, `aborted`, `total`) for that dimension, silently corrupting the entire dimension's data. A simple `|| 0` fallback would make this robust.

   Suggested fix:
   const count = parseInt(document_count, 10) || 0;

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
test — d31ef7ac Deployed Mar 28, 2026 by ShaileshParmar11 via playwright-ci-postgresql (2, 6) #39169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Data Quality Dashboard to OpenSource

3 participants