Use display name in dq (#11200)

This commit is contained in:
Teddy 2023-04-24 18:42:40 +02:00 committed by GitHub
parent f9b26bb785
commit 3524df3389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 5 deletions

View File

@ -330,6 +330,12 @@ parameterValues:
### Table Row Inserted Count To Be Between ### Table Row Inserted Count To Be Between
Validate the number of rows inserted for the defined period is between the expected range Validate the number of rows inserted for the defined period is between the expected range
{% note %}
The Table Row Inserted Count To Be Between cannot be executed against tables that have configured a partition in OpenMetadata. The logic of the test performed will be similar to executiong a Table Row Count to be Between test against a table with a partition configured.
{% /note %}
**Properties** **Properties**
* `Min Row Count`: Lower bound * `Min Row Count`: Lower bound

View File

@ -47,7 +47,7 @@ export const DATA_QUALITY_SAMPLE_DATA_TABLE = {
serviceName: 'sample_data', serviceName: 'sample_data',
testCaseName: 'column_value_max_to_be_between', testCaseName: 'column_value_max_to_be_between',
testSuiteName: 'critical_metrics_suite', testSuiteName: 'critical_metrics_suite',
sqlTestCase: 'tableCustomSQLQuery', sqlTestCase: 'Custom SQL Query',
sqlQuery: 'Select * from dim_address', sqlQuery: 'Select * from dim_address',
}; };
@ -170,6 +170,7 @@ export const NEW_TEST_SUITE = {
}; };
export const NEW_TABLE_TEST_CASE = { export const NEW_TABLE_TEST_CASE = {
label: 'Table Column Name To Exist',
type: 'tableColumnNameToExist', type: 'tableColumnNameToExist',
field: 'id', field: 'id',
description: 'New table test case for TableColumnNameToExist', description: 'New table test case for TableColumnNameToExist',
@ -178,6 +179,7 @@ export const NEW_TABLE_TEST_CASE = {
export const NEW_COLUMN_TEST_CASE = { export const NEW_COLUMN_TEST_CASE = {
column: 'id', column: 'id',
type: 'columnValueLengthsToBeBetween', type: 'columnValueLengthsToBeBetween',
label: 'Column Value Lengths To Be Between',
min: 3, min: 3,
max: 6, max: 6,
description: 'New table test case for columnValueLengthsToBeBetween', description: 'New table test case for columnValueLengthsToBeBetween',
@ -186,6 +188,7 @@ export const NEW_COLUMN_TEST_CASE = {
export const NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE = { export const NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE = {
column: 'id', column: 'id',
type: 'columnValuesToBeNotNull', type: 'columnValuesToBeNotNull',
label: 'Column Values To Be Not Null',
description: 'New table test case for columnValuesToBeNotNull', description: 'New table test case for columnValuesToBeNotNull',
}; };

View File

@ -182,7 +182,7 @@ describe('Data Quality and Profiler should work properly', () => {
// creating new test case // creating new test case
cy.get('#tableTestForm_testTypeId').scrollIntoView().click(); cy.get('#tableTestForm_testTypeId').scrollIntoView().click();
cy.contains(NEW_TABLE_TEST_CASE.type).should('be.visible').click(); cy.contains(NEW_TABLE_TEST_CASE.label).should('be.visible').click();
cy.get('#tableTestForm_params_columnName') cy.get('#tableTestForm_params_columnName')
.should('be.visible') .should('be.visible')
.type(NEW_TABLE_TEST_CASE.field); .type(NEW_TABLE_TEST_CASE.field);
@ -304,7 +304,7 @@ describe('Data Quality and Profiler should work properly', () => {
// creating new test case // creating new test case
cy.get('#tableTestForm_testTypeId').scrollIntoView().click(); cy.get('#tableTestForm_testTypeId').scrollIntoView().click();
cy.get(`[title="${NEW_COLUMN_TEST_CASE.type}"]`) cy.get(`[title="${NEW_COLUMN_TEST_CASE.label}"]`)
.scrollIntoView() .scrollIntoView()
.should('be.visible') .should('be.visible')
.click(); .click();
@ -359,7 +359,7 @@ describe('Data Quality and Profiler should work properly', () => {
.click(); .click();
cy.get('#tableTestForm_testTypeId').scrollIntoView().click(); cy.get('#tableTestForm_testTypeId').scrollIntoView().click();
cy.get(`[title="${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.type}"]`) cy.get(`[title="${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.label}"]`)
.scrollIntoView() .scrollIntoView()
.should('be.visible') .should('be.visible')
.click(); .click();

View File

@ -19,6 +19,7 @@ import { isEmpty } from 'lodash';
import React, { useCallback, useEffect, useRef, useState } from 'react'; import React, { useCallback, useEffect, useRef, useState } from 'react';
import { useParams } from 'react-router-dom'; import { useParams } from 'react-router-dom';
import { getListTestCase, getListTestDefinitions } from 'rest/testAPI'; import { getListTestCase, getListTestDefinitions } from 'rest/testAPI';
import { getEntityName } from 'utils/EntityUtils';
import { API_RES_MAX_SIZE } from '../../../constants/constants'; import { API_RES_MAX_SIZE } from '../../../constants/constants';
import { CSMode } from '../../../enums/codemirror.enum'; import { CSMode } from '../../../enums/codemirror.enum';
import { ProfilerDashboardType } from '../../../enums/table.enum'; import { ProfilerDashboardType } from '../../../enums/table.enum';
@ -284,7 +285,7 @@ const TestCaseForm: React.FC<TestCaseFormProps> = ({
]}> ]}>
<Select <Select
options={testDefinitions.map((suite) => ({ options={testDefinitions.map((suite) => ({
label: suite.name, label: getEntityName(suite),
value: suite.fullyQualifiedName, value: suite.fullyQualifiedName,
}))} }))}
placeholder={t('label.select-field', { field: t('label.test-type') })} placeholder={t('label.select-field', { field: t('label.test-type') })}