Skip to content

Commit

Permalink
added supportsIncrementalMetadataExtraction in connection config
Browse files Browse the repository at this point in the history
  • Loading branch information
shrushti2000 committed Jan 23, 2025
1 parent b1b70cc commit 379885b
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 64 deletions.
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,7 +289,7 @@ const AddIngestion = ({
operationType={status}
pipeLineType={pipelineType}
serviceCategory={serviceCategory}
serviceType={serviceData.serviceType}
serviceData={serviceData}
workflowData={workflowData}
onCancel={handleCancelClick}
onChange={handleDataChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { isUndefined, omit, omitBy } from 'lodash';
import React, { FC, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
DATABASES_WITHOUT_INCREMENTAL_EXTRACTION_SUPPORT,
EXCLUDE_INCREMENTAL_EXTRACTION_SUPPORT_UI_SCHEMA,
INGESTION_ELASTIC_SEARCH_WORKFLOW_UI_SCHEMA,
INGESTION_WORKFLOW_UI_SCHEMA,
Expand All @@ -28,7 +27,6 @@ import {
DbtConfigType,
PipelineType,
} from '../../../../../generated/api/services/ingestionPipelines/createIngestionPipeline';
import { DatabaseServiceType } from '../../../../../generated/entity/data/database';
import {
IngestionWorkflowData,
IngestionWorkflowFormProps,
Expand All @@ -53,7 +51,7 @@ const IngestionWorkflowForm: FC<IngestionWorkflowFormProps> = ({
onFocus,
onSubmit,
onChange,
serviceType,
serviceData,
}) => {
const [internalData, setInternalData] =
useState<IngestionWorkflowData>(workflowData);
Expand All @@ -75,10 +73,8 @@ const IngestionWorkflowForm: FC<IngestionWorkflowFormProps> = ({

const isDbtPipeline = pipeLineType === PipelineType.Dbt;

const isIncrementalExtractionNotSupported =
DATABASES_WITHOUT_INCREMENTAL_EXTRACTION_SUPPORT.includes(
serviceType as DatabaseServiceType
);
const isIncrementalExtractionSupported =
serviceData?.connection.config.supportsIncrementalMetadataExtraction;

const uiSchema = useMemo(() => {
let commonSchema = { ...INGESTION_WORKFLOW_UI_SCHEMA };
Expand All @@ -89,7 +85,7 @@ const IngestionWorkflowForm: FC<IngestionWorkflowFormProps> = ({
};
}

if (isIncrementalExtractionNotSupported) {
if (!isIncrementalExtractionSupported) {
commonSchema = {
...commonSchema,
...EXCLUDE_INCREMENTAL_EXTRACTION_SUPPORT_UI_SCHEMA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,6 @@ export const INGESTION_WORKFLOW_UI_SCHEMA = {
],
};

export const DATABASES_WITHOUT_INCREMENTAL_EXTRACTION_SUPPORT = [
DatabaseServiceType.Mysql,
DatabaseServiceType.Postgres,
DatabaseServiceType.Mssql,
];

export const EXCLUDE_INCREMENTAL_EXTRACTION_SUPPORT_UI_SCHEMA = {
incremental: {
'ui:widget': 'hidden',
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 @@ -22,10 +22,7 @@ import {
DashboardConnection,
DashboardService,
} from '../generated/entity/services/dashboardService';
import {
DatabaseService,
DatabaseServiceType,
} from '../generated/entity/services/databaseService';
import { DatabaseService } from '../generated/entity/services/databaseService';
import {
MessagingConnection,
MessagingService,
Expand Down Expand Up @@ -138,5 +135,5 @@ export interface IngestionWorkflowFormProps {
onFocus: (fieldId: string) => void;
onSubmit: (data: IngestionWorkflowData) => void;
onChange?: (data: IngestionWorkflowData) => void;
serviceType?: DatabaseServiceType;
serviceData?: any;
}

0 comments on commit 379885b

Please sign in to comment.