Skip to content

Commit

Permalink
feature: upgrade seatunnel oracle-cdc connector to 2.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqi committed Aug 29, 2024
1 parent 3dda4a3 commit dd4f21c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public OracleCDCSourcePlugin() {
props.add(PASSWORD);
props.add(DATABASE);
props.add(OracleCDCSourceProperties.SCHEMA);
props.add(OracleCDCSourceProperties.USE_SELECT_COUNT);
props.add(OracleCDCSourceProperties.SKIP_ANALYZE);
props.add(TABLE);
props.add(TABLE_CONFIG);
props.add(STARTUP_MODE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,20 @@ public enum OracleCDCSourceProperties {
.parser(Parsers.STRING_ARRAY_PARSER)
.addValidator(Validators.NON_BLANK_VALIDATOR)
.validateAndBuild();

public static final PropertyDescriptor<Boolean> USE_SELECT_COUNT = new PropertyDescriptor.Builder()
.name("use_select_count")
.description("Use select count for table count rather then other methods in full stage.In this scenario, select count directly is used when it is faster to update statistics using sql from analysis table")
.type(PropertyType.BOOLEAN)
.parser(Parsers.BOOLEAN_PARSER)
.addValidator(Validators.BOOLEAN_VALIDATOR)
.validateAndBuild();

public static final PropertyDescriptor<Boolean> SKIP_ANALYZE = new PropertyDescriptor.Builder()
.name("skip_analyze")
.description("Skip the analysis of table count in full stage.In this scenario, you schedule analysis table sql to update related table statistics periodically or your table data does not change frequently")
.type(PropertyType.BOOLEAN)
.parser(Parsers.BOOLEAN_PARSER)
.addValidator(Validators.BOOLEAN_VALIDATOR)
.validateAndBuild();
}
8 changes: 6 additions & 2 deletions scaleph-ui-react/src/locales/zh-CN/pages/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,6 @@ export default {
'pages.project.di.step.cdc.password': '密码',
'pages.project.di.step.cdc.databases': '数据库',
'pages.project.di.step.cdc.databases.placeholder': 'db1, db2',
'pages.project.di.step.cdc.schemas': 'Schema',
'pages.project.di.step.cdc.schemas.placeholder': 'DEBEZIUM1, DEBEZIUM2',
'pages.project.di.step.cdc.tables': '表',
'pages.project.di.step.cdc.tables.placeholder': 'table1, table2',
'pages.project.di.step.cdc.tableConfig': '表配置',
Expand Down Expand Up @@ -832,6 +830,12 @@ export default {
'pages.project.di.step.cdc.debeziums.value.placeholder': 'never',
'pages.project.di.step.cdc.format': 'CDC 格式',

// oracle-cdc
'pages.project.di.step.oracle-cdc.schemaNames': 'Schema',
'pages.project.di.step.oracle-cdc.schemaNames.placeholder': 'DEBEZIUM1, DEBEZIUM2',
'pages.project.di.step.oracle-cdc.useSelectCount': '使用 select count()',
'pages.project.di.step.oracle-cdc.skipAnalyze': '跳过表 analysis',

// mongodb-cdc
'pages.project.di.step.mongodb-cdc.hosts': '服务器地址',
'pages.project.di.step.mongodb-cdc.hosts.placeholder': 'localhost:27017,localhost:27018',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,12 @@ export const CDCParams = {
format: 'format',
};

export const OracleCDCParams = {
schemaNames: 'schema-names',
useSelectCount: 'use_select_count',
skipAnalyze: 'skip_analyze',
};

export const MongoDBCDCParams = {
hosts: 'hosts',
username: 'username',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import {getIntl, getLocale} from "@umijs/max";
import {Node, XFlow} from '@antv/xflow';
import {ModalFormProps} from '@/typings';
import {CDCParams, STEP_ATTR_TYPE} from '../constant';
import {CDCParams, OracleCDCParams, STEP_ATTR_TYPE} from '../constant';
import {StepSchemaService} from '../helper';
import {DictDataService} from "@/services/admin/dictData.service";
import {DICT_TYPE} from "@/constants/dictType";
Expand Down Expand Up @@ -83,9 +83,9 @@ const SourceCDCOracleStepForm: React.FC<ModalFormProps<Node>> = ({data, visible,
colProps={{span: 8}}
/>
<ProFormText
name={CDCParams.schemas}
label={intl.formatMessage({id: 'pages.project.di.step.cdc.schemas'})}
placeholder={intl.formatMessage({id: 'pages.project.di.step.cdc.schemas.placeholder'})}
name={OracleCDCParams.schemaNames}
label={intl.formatMessage({id: 'pages.project.di.step.oracle-cdc.schemaNames'})}
placeholder={intl.formatMessage({id: 'pages.project.di.step.oracle-cdc.schemaNames.placeholder'})}
colProps={{span: 8}}
/>
<ProFormText
Expand Down Expand Up @@ -298,6 +298,16 @@ const SourceCDCOracleStepForm: React.FC<ModalFormProps<Node>> = ({data, visible,
return DictDataService.listDictDataByType2(DICT_TYPE.seatunnelCDCFormat)
}}
/>
<ProFormSwitch
name={OracleCDCParams.useSelectCount}
label={intl.formatMessage({id: 'pages.project.di.step.oracle-cdc.useSelectCount'})}
colProps={{span: 12}}
/>
<ProFormSwitch
name={OracleCDCParams.skipAnalyze}
label={intl.formatMessage({id: 'pages.project.di.step.oracle-cdc.skipAnalyze'})}
colProps={{span: 12}}
/>
</DrawerForm>
</XFlow>
);
Expand Down

0 comments on commit dd4f21c

Please sign in to comment.