mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-10 15:59:57 +00:00
Fix markDeleteTables issue and usage/profiler ingestion description text (#4501)
This commit is contained in:
parent
b863d91360
commit
f1da85036f
@ -21,6 +21,7 @@ import {
|
|||||||
} from '../../constants/ingestion.constant';
|
} from '../../constants/ingestion.constant';
|
||||||
import { FilterPatternEnum } from '../../enums/filterPattern.enum';
|
import { FilterPatternEnum } from '../../enums/filterPattern.enum';
|
||||||
import { FormSubmitType } from '../../enums/form.enum';
|
import { FormSubmitType } from '../../enums/form.enum';
|
||||||
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import {
|
import {
|
||||||
ConfigClass,
|
ConfigClass,
|
||||||
CreateIngestionPipeline,
|
CreateIngestionPipeline,
|
||||||
@ -55,6 +56,10 @@ const AddIngestion = ({
|
|||||||
handleCancelClick,
|
handleCancelClick,
|
||||||
handleViewServiceClick,
|
handleViewServiceClick,
|
||||||
}: AddIngestionProps) => {
|
}: AddIngestionProps) => {
|
||||||
|
const isDatabaseService = useMemo(() => {
|
||||||
|
return serviceCategory === ServiceCategory.DATABASE_SERVICES;
|
||||||
|
}, [serviceCategory]);
|
||||||
|
|
||||||
const [saveState, setSaveState] = useState<LoadingState>('initial');
|
const [saveState, setSaveState] = useState<LoadingState>('initial');
|
||||||
const [ingestionName, setIngestionName] = useState(
|
const [ingestionName, setIngestionName] = useState(
|
||||||
data?.name ?? getIngestionName(serviceData.name, pipelineType)
|
data?.name ?? getIngestionName(serviceData.name, pipelineType)
|
||||||
@ -110,7 +115,12 @@ const AddIngestion = ({
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
const [markDeletedTables, setMarkDeletedTables] = useState(
|
const [markDeletedTables, setMarkDeletedTables] = useState(
|
||||||
(data?.source.sourceConfig.config as ConfigClass)?.markDeletedTables ?? true
|
isDatabaseService
|
||||||
|
? Boolean(
|
||||||
|
(data?.source.sourceConfig.config as ConfigClass)
|
||||||
|
?.markDeletedTables ?? true
|
||||||
|
)
|
||||||
|
: undefined
|
||||||
);
|
);
|
||||||
const [dashboardFilterPattern, setDashboardFilterPattern] =
|
const [dashboardFilterPattern, setDashboardFilterPattern] =
|
||||||
useState<FilterPattern>(
|
useState<FilterPattern>(
|
||||||
@ -302,7 +312,7 @@ const AddIngestion = ({
|
|||||||
enableDataProfiler: enableDataProfiler,
|
enableDataProfiler: enableDataProfiler,
|
||||||
generateSampleData: ingestSampleData,
|
generateSampleData: ingestSampleData,
|
||||||
includeViews: includeView,
|
includeViews: includeView,
|
||||||
markDeletedTables: markDeletedTables,
|
markDeletedTables: isDatabaseService ? markDeletedTables : undefined,
|
||||||
schemaFilterPattern: getFilterPatternData(schemaFilterPattern),
|
schemaFilterPattern: getFilterPatternData(schemaFilterPattern),
|
||||||
tableFilterPattern: getFilterPatternData(tableFilterPattern),
|
tableFilterPattern: getFilterPatternData(tableFilterPattern),
|
||||||
chartFilterPattern: getFilterPatternData(chartFilterPattern),
|
chartFilterPattern: getFilterPatternData(chartFilterPattern),
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { isNil } from 'lodash';
|
||||||
import { EditorContentRef } from 'Models';
|
import { EditorContentRef } from 'Models';
|
||||||
import React, { Fragment, useRef } from 'react';
|
import React, { Fragment, useRef } from 'react';
|
||||||
import { FilterPatternEnum } from '../../../enums/filterPattern.enum';
|
import { FilterPatternEnum } from '../../../enums/filterPattern.enum';
|
||||||
@ -207,20 +208,26 @@ const ConfigureIngestion = ({
|
|||||||
</p>
|
</p>
|
||||||
{getSeparator('')}
|
{getSeparator('')}
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
{!isNil(markDeletedTables) && (
|
||||||
<div className="tw-flex tw-gap-1">
|
<Field>
|
||||||
<label>Mark Deleted Tables</label>
|
<div className="tw-flex tw-gap-1">
|
||||||
<ToggleSwitchV1
|
<label>Mark Deleted Tables</label>
|
||||||
checked={markDeletedTables}
|
<ToggleSwitchV1
|
||||||
handleCheck={handleMarkDeletedTables}
|
checked={markDeletedTables}
|
||||||
/>
|
handleCheck={() => {
|
||||||
</div>
|
if (handleMarkDeletedTables) {
|
||||||
<p className="tw-text-grey-muted tw-mt-3">
|
handleMarkDeletedTables();
|
||||||
Any deleted tables in the data source will be soft deleted in
|
}
|
||||||
OpenMetadata
|
}}
|
||||||
</p>
|
/>
|
||||||
{getSeparator('')}
|
</div>
|
||||||
</Field>
|
<p className="tw-text-grey-muted tw-mt-3">
|
||||||
|
Any deleted tables in the data source will be soft deleted in
|
||||||
|
OpenMetadata
|
||||||
|
</p>
|
||||||
|
{getSeparator('')}
|
||||||
|
</Field>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -59,7 +59,7 @@ export interface ConfigureIngestionProps {
|
|||||||
includeView: boolean;
|
includeView: boolean;
|
||||||
enableDataProfiler: boolean;
|
enableDataProfiler: boolean;
|
||||||
ingestSampleData: boolean;
|
ingestSampleData: boolean;
|
||||||
markDeletedTables: boolean;
|
markDeletedTables?: boolean;
|
||||||
pipelineType: PipelineType;
|
pipelineType: PipelineType;
|
||||||
showDashboardFilter: boolean;
|
showDashboardFilter: boolean;
|
||||||
showSchemaFilter: boolean;
|
showSchemaFilter: boolean;
|
||||||
@ -75,7 +75,7 @@ export interface ConfigureIngestionProps {
|
|||||||
handleIncludeView: () => void;
|
handleIncludeView: () => void;
|
||||||
handleEnableDataProfiler: () => void;
|
handleEnableDataProfiler: () => void;
|
||||||
handleIngestSampleData: () => void;
|
handleIngestSampleData: () => void;
|
||||||
handleMarkDeletedTables: () => void;
|
handleMarkDeletedTables?: () => void;
|
||||||
getIncludeValue: (value: string[], type: FilterPatternEnum) => void;
|
getIncludeValue: (value: string[], type: FilterPatternEnum) => void;
|
||||||
getExcludeValue: (value: string[], type: FilterPatternEnum) => void;
|
getExcludeValue: (value: string[], type: FilterPatternEnum) => void;
|
||||||
handleShowFilter: (value: boolean, type: FilterPatternEnum) => void;
|
handleShowFilter: (value: boolean, type: FilterPatternEnum) => void;
|
||||||
|
|||||||
@ -62,8 +62,14 @@ const AddService = ({
|
|||||||
const [saveServiceState, setSaveServiceState] =
|
const [saveServiceState, setSaveServiceState] =
|
||||||
useState<LoadingState>('initial');
|
useState<LoadingState>('initial');
|
||||||
|
|
||||||
|
const resetServiceData = () => {
|
||||||
|
setServiceName('');
|
||||||
|
setDescription('');
|
||||||
|
};
|
||||||
|
|
||||||
const handleServiceTypeClick = (type: string) => {
|
const handleServiceTypeClick = (type: string) => {
|
||||||
setShowErrorMessage({ ...showErrorMessage, serviceType: false });
|
setShowErrorMessage({ ...showErrorMessage, serviceType: false });
|
||||||
|
resetServiceData();
|
||||||
setSelectServiceType(type);
|
setSelectServiceType(type);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -57,8 +57,8 @@ export const addUsageIngestionGuide = [
|
|||||||
{
|
{
|
||||||
step: 1,
|
step: 1,
|
||||||
title: 'Add Usage Ingestion',
|
title: 'Add Usage Ingestion',
|
||||||
description: `Based on the service type selected, enter the filter pattern details for the schema or table (database), or topic (messaging), or dashboard.
|
description: `We can create a workflow that will obtain the query log and table creation information from the underlying database and feed it to OpenMetadata.
|
||||||
You can include or exclude the filter patterns. Choose to include views, enable or disable the data profiler, and ingest sample data, as required.`,
|
The Usage Ingestion will be in charge of obtaining this data.`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...schedulingIngestionGuide,
|
...schedulingIngestionGuide,
|
||||||
@ -67,7 +67,7 @@ export const addUsageIngestionGuide = [
|
|||||||
step: 3,
|
step: 3,
|
||||||
title: 'Usage Ingestion Added Successfully',
|
title: 'Usage Ingestion Added Successfully',
|
||||||
description:
|
description:
|
||||||
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The metadata will be ingested at a regular interval as per the schedule.',
|
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The usage will be ingested at a regular interval as per the schedule.',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -75,14 +75,14 @@ export const addProfilerIngestionGuide = [
|
|||||||
{
|
{
|
||||||
step: 1,
|
step: 1,
|
||||||
title: 'Add Profiler Ingestion',
|
title: 'Add Profiler Ingestion',
|
||||||
description: `Based on the service type selected, enter the filter pattern details for the schema or table (database), or topic (messaging), or dashboard.
|
description: `After the metadata ingestion has been done correctly, we can configure and deploy the Profiler Workflow.
|
||||||
You can include or exclude the filter patterns. Choose to include views, enable or disable the data profiler, and ingest sample data, as required.`,
|
This Pipeline will be in charge of feeding the Profiler tab of the Table Entity, as well as running any tests configured in the Entity.`,
|
||||||
},
|
},
|
||||||
{ ...schedulingIngestionGuide },
|
{ ...schedulingIngestionGuide },
|
||||||
{
|
{
|
||||||
step: 3,
|
step: 3,
|
||||||
title: 'Profiler Ingestion Added Successfully',
|
title: 'Profiler Ingestion Added Successfully',
|
||||||
description:
|
description:
|
||||||
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The metadata will be ingested at a regular interval as per the schedule.',
|
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The profiler will run at a regular interval as per the schedule.',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user