组件 ID:
{idNum}
diff --git a/apps/platform/src/modules/component-config/template-quick-config/quick-config-psi.tsx b/apps/platform/src/modules/component-config/template-quick-config/quick-config-psi.tsx
index 68f36ca..c760122 100644
--- a/apps/platform/src/modules/component-config/template-quick-config/quick-config-psi.tsx
+++ b/apps/platform/src/modules/component-config/template-quick-config/quick-config-psi.tsx
@@ -1,6 +1,6 @@
import { PlusCircleFilled, DeleteOutlined } from '@ant-design/icons';
import type { FormInstance } from 'antd';
-import { Form, Select, Tag, Typography } from 'antd';
+import { Form, Input, Select, Tag, Typography } from 'antd';
import { parse } from 'query-string';
import type { Dispatch, SetStateAction } from 'react';
import { useState, useEffect } from 'react';
@@ -18,7 +18,12 @@ import styles from './index.less';
const { Option } = Select;
type QuickConfigPSIComponentProps = {
- tables: { datatableId: string; nodeName: string; datatableName: string }[];
+ tables: {
+ datatableId: string;
+ nodeName: string;
+ datatableName: string;
+ isPartitionTable?: boolean;
+ }[];
tableList: (API.ProjectDatatableBaseVO & {
nodeId: string | undefined;
nodeName: string | undefined;
@@ -131,7 +136,7 @@ export const QuickConfigPSIComponent = (props: QuickConfigPSIComponentProps) =>
}}
>
+
+ {({ getFieldValue }) => {
+ const selectId = getFieldValue('dataTableReceiver');
+ const selected = tables.find(
+ (t) => t.datatableId === selectId?.s,
+ )?.isPartitionTable;
+ if (selected && type === 'MPC') {
+ return (
+
+ {`1. 填写dt=maxpt,则获取最新分区;dt为分区字段`}
+
+ {'2. 如自定义规则获取分区表,可填写如:dt=${yyyymmdd+/- 3}'}
+
+
+ {'3. 如选择多表自动union,则填写如dt=20240607 or dt=20240608'}
+
+
+ {
+ '4. 支持and or 作为多个分区列条件聚合,支持 = != < > >= <= 作为分区列比较条件,其他暂不支持'
+ }
+
+ {'5. 条件列必须是添加数据表时指定的一级或二级分区字段'}
+ >
+ }
+ label={分区
}
+ name={'dataTableReceiverPartition'}
+ >
+
+
+ );
+ }
+ return false;
+ }}
+
{(fields, { add, remove }, { errors }) =>
@@ -224,7 +281,7 @@ export const QuickConfigPSIComponent = (props: QuickConfigPSIComponentProps) =>
}}
>
+
+ {({ getFieldValue }) => {
+ const selectId = getFieldValue('dataTableSender');
+ const selected = tables.find(
+ (t) => t.datatableId === selectId?.s,
+ )?.isPartitionTable;
+ if (selected && type === 'MPC') {
+ return (
+
+ {`1. 填写dt=maxpt,则获取最新分区;dt为分区字段`}
+
+ {'2. 如自定义规则获取分区表,可填写如:dt=${yyyymmdd+/- 3}'}
+
+
+ {'3. 如选择多表自动union,则填写如dt=20240607 or dt=20240608'}
+
+
+ {
+ '4. 支持and or 作为多个分区列条件聚合,支持 = != < > >= <= 作为分区列比较条件,其他暂不支持'
+ }
+
+ {'5. 条件列必须是添加数据表时指定的一级或二级分区字段'}
+ >
+ }
+ label={分区
}
+ name={'dataTableSenderPartition'}
+ >
+
+
+ );
+ }
+ return false;
+ }}
+
+
{(fields, { add, remove }, { errors }) =>
fields.map((field, index) => (
@@ -376,6 +486,7 @@ export const QuickConfigPSI = (props: { type?: 'MPC' | 'TEE' }) => {
datatableId: string;
nodeName: string;
datatableName: string;
+ isPartitionTable: boolean; // 是否是ODPS分区表
}[] = [];
const dataTableList: (API.ProjectDatatableBaseVO & {
nodeId: string | undefined;
@@ -397,6 +508,8 @@ export const QuickConfigPSI = (props: { type?: 'MPC' | 'TEE' }) => {
datatableId: table.datatableId,
nodeName: nodeName as string,
datatableName: table.datatableName,
+ isPartitionTable:
+ table.partition?.type === 'odps' && table.partition?.fields,
});
});
});
diff --git a/apps/platform/src/modules/component-config/template-quick-config/quick-config-risk.tsx b/apps/platform/src/modules/component-config/template-quick-config/quick-config-risk.tsx
index 4b0386c..fe5df8a 100644
--- a/apps/platform/src/modules/component-config/template-quick-config/quick-config-risk.tsx
+++ b/apps/platform/src/modules/component-config/template-quick-config/quick-config-risk.tsx
@@ -13,7 +13,12 @@ import { QuickConfigPSIComponent } from './quick-config-psi';
export const QuickConfigRisk = () => {
const form = Form.useFormInstance();
const [tables, setTables] = useState<
- { datatableId: string; nodeName: string; datatableName: string }[]
+ {
+ datatableId: string;
+ nodeName: string;
+ datatableName: string;
+ isPartitionTable?: boolean;
+ }[]
>([]);
const [nodeOptions, setNodeOptions] = useState<
{
@@ -71,6 +76,7 @@ export const QuickConfigRisk = () => {
datatableId: string;
nodeName: string;
datatableName: string;
+ isPartitionTable: boolean; // 是否是ODPS分区表
}[] = [];
const dataTableList: (API.ProjectDatatableBaseVO & {
nodeId: string | undefined;
@@ -91,6 +97,8 @@ export const QuickConfigRisk = () => {
datatableId: table.datatableId,
nodeName: nodeName as string,
datatableName: table.datatableName,
+ isPartitionTable:
+ table.partition?.type === 'odps' && table.partition?.fields,
});
});
});
diff --git a/apps/platform/src/modules/cooperative-node-list/cooperative-node-detail-modal.tsx b/apps/platform/src/modules/cooperative-node-list/cooperative-node-detail-modal.tsx
index 9302434..d3da79a 100644
--- a/apps/platform/src/modules/cooperative-node-list/cooperative-node-detail-modal.tsx
+++ b/apps/platform/src/modules/cooperative-node-list/cooperative-node-detail-modal.tsx
@@ -154,6 +154,9 @@ export const CooperativeNodeDetailDrawer = ({