Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Hide Incremental Metadata Extraction config for unsupported database sources #19468

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"type": "boolean",
"default": true
},
"supportsIncrementalMetadataExtraction": {
"description": "Supports Incremental Metadata Extraction.",
"type": "boolean",
"default": true
},
"supportsUsageExtraction": {
"description": "Supports Usage Extraction.",
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
"title": "Supports Metadata Extraction",
"$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction"
},
"supportsIncrementalMetadataExtraction": {
"title": "Supports Incremental Metadata Extraction",
"$ref": "../connectionBasicType.json#/definitions/supportsIncrementalMetadataExtraction"
},
"supportsUsageExtraction": {
"$ref": "../connectionBasicType.json#/definitions/supportsUsageExtraction"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
"title": "Supports Metadata Extraction",
"$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction"
},
"supportsIncrementalMetadataExtraction": {
"title": "Supports Incremental Metadata Extraction",
"$ref": "../connectionBasicType.json#/definitions/supportsIncrementalMetadataExtraction"
},
"supportsUsageExtraction": {
"$ref": "../connectionBasicType.json#/definitions/supportsUsageExtraction"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
"title": "Supports Metadata Extraction",
"$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction"
},
"supportsIncrementalMetadataExtraction": {
"title": "Supports Incremental Metadata Extraction",
"$ref": "../connectionBasicType.json#/definitions/supportsIncrementalMetadataExtraction"
},
"supportsUsageExtraction": {
"$ref": "../connectionBasicType.json#/definitions/supportsUsageExtraction"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ const AddIngestion = ({
operationType={status}
pipeLineType={pipelineType}
serviceCategory={serviceCategory}
serviceData={serviceData}
workflowData={workflowData}
onCancel={handleCancelClick}
onChange={handleDataChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { isUndefined, omit, omitBy } from 'lodash';
import React, { FC, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
EXCLUDE_INCREMENTAL_EXTRACTION_SUPPORT_UI_SCHEMA,
INGESTION_ELASTIC_SEARCH_WORKFLOW_UI_SCHEMA,
INGESTION_WORKFLOW_UI_SCHEMA,
} from '../../../../../constants/Services.constant';
Expand Down Expand Up @@ -50,6 +51,7 @@ const IngestionWorkflowForm: FC<IngestionWorkflowFormProps> = ({
onFocus,
onSubmit,
onChange,
serviceData,
}) => {
const [internalData, setInternalData] =
useState<IngestionWorkflowData>(workflowData);
Expand All @@ -71,6 +73,9 @@ const IngestionWorkflowForm: FC<IngestionWorkflowFormProps> = ({

const isDbtPipeline = pipeLineType === PipelineType.Dbt;

const isIncrementalExtractionSupported =
serviceData?.connection.config.supportsIncrementalMetadataExtraction;

const uiSchema = useMemo(() => {
let commonSchema = { ...INGESTION_WORKFLOW_UI_SCHEMA };
if (isElasticSearchPipeline) {
Expand All @@ -80,6 +85,13 @@ const IngestionWorkflowForm: FC<IngestionWorkflowFormProps> = ({
};
}

if (!isIncrementalExtractionSupported) {
commonSchema = {
...commonSchema,
...EXCLUDE_INCREMENTAL_EXTRACTION_SUPPORT_UI_SCHEMA,
};
}

return commonSchema;
}, [pipeLineType, operationType]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,13 @@ export const INGESTION_WORKFLOW_UI_SCHEMA = {
],
};

export const EXCLUDE_INCREMENTAL_EXTRACTION_SUPPORT_UI_SCHEMA = {
incremental: {
'ui:widget': 'hidden',
'ui:hideError': true,
},
};

export const COMMON_UI_SCHEMA = {
...DEF_UI_SCHEMA,
connection: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Collate.
* Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -10,9 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/


/**
/**
* Google BigQuery Connection Config
*/
export interface BigQueryConnection {
Expand All @@ -30,16 +28,17 @@ export interface BigQueryConnection {
/**
* SQLAlchemy driver scheme options.
*/
scheme?: BigqueryScheme;
supportsDatabase?: boolean;
supportsDataDiff?: boolean;
supportsDBTExtraction?: boolean;
supportsLineageExtraction?: boolean;
supportsMetadataExtraction?: boolean;
supportsProfiler?: boolean;
supportsQueryComment?: boolean;
supportsSystemProfile?: boolean;
supportsUsageExtraction?: boolean;
scheme?: BigqueryScheme;
supportsDatabase?: boolean;
supportsDataDiff?: boolean;
supportsDBTExtraction?: boolean;
supportsIncrementalMetadataExtraction?: boolean;
supportsLineageExtraction?: boolean;
supportsMetadataExtraction?: boolean;
supportsProfiler?: boolean;
supportsQueryComment?: boolean;
supportsSystemProfile?: boolean;
supportsUsageExtraction?: boolean;
/**
* Taxonomy location used to fetch policy tags
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Collate.
* Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -10,9 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/


/**
/**
* Redshift Connection Config
*/
export interface RedshiftConnection {
Expand Down Expand Up @@ -40,18 +38,19 @@ export interface RedshiftConnection {
/**
* SQLAlchemy driver scheme options.
*/
scheme?: RedshiftScheme;
sslConfig?: Config;
sslMode?: SSLMode;
supportsDatabase?: boolean;
supportsDataDiff?: boolean;
supportsDBTExtraction?: boolean;
supportsLineageExtraction?: boolean;
supportsMetadataExtraction?: boolean;
supportsProfiler?: boolean;
supportsQueryComment?: boolean;
supportsSystemProfile?: boolean;
supportsUsageExtraction?: boolean;
scheme?: RedshiftScheme;
sslConfig?: Config;
sslMode?: SSLMode;
supportsDatabase?: boolean;
supportsDataDiff?: boolean;
supportsDBTExtraction?: boolean;
supportsIncrementalMetadataExtraction?: boolean;
supportsLineageExtraction?: boolean;
supportsMetadataExtraction?: boolean;
supportsProfiler?: boolean;
supportsQueryComment?: boolean;
supportsSystemProfile?: boolean;
supportsUsageExtraction?: boolean;
/**
* Service Type
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Collate.
* Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -10,9 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/


/**
/**
* Snowflake Connection Config
*/
export interface SnowflakeConnection {
Expand Down Expand Up @@ -64,16 +62,17 @@ export interface SnowflakeConnection {
/**
* Snowflake Passphrase Key used with Private Key
*/
snowflakePrivatekeyPassphrase?: string;
supportsDatabase?: boolean;
supportsDataDiff?: boolean;
supportsDBTExtraction?: boolean;
supportsLineageExtraction?: boolean;
supportsMetadataExtraction?: boolean;
supportsProfiler?: boolean;
supportsQueryComment?: boolean;
supportsSystemProfile?: boolean;
supportsUsageExtraction?: boolean;
snowflakePrivatekeyPassphrase?: string;
supportsDatabase?: boolean;
supportsDataDiff?: boolean;
supportsDBTExtraction?: boolean;
supportsIncrementalMetadataExtraction?: boolean;
supportsLineageExtraction?: boolean;
supportsMetadataExtraction?: boolean;
supportsProfiler?: boolean;
supportsQueryComment?: boolean;
supportsSystemProfile?: boolean;
supportsUsageExtraction?: boolean;
/**
* Service Type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* limitations under the License.
*/

import { ServicesUpdateRequest } from 'Models';
import { FormSubmitType } from '../enums/form.enum';
import { ServiceCategory } from '../enums/service.enum';
import {
Expand Down Expand Up @@ -135,4 +136,5 @@ export interface IngestionWorkflowFormProps {
onFocus: (fieldId: string) => void;
onSubmit: (data: IngestionWorkflowData) => void;
onChange?: (data: IngestionWorkflowData) => void;
serviceData?: ServicesUpdateRequest;
}
Loading