This is an automated email from the ASF dual-hosted git repository. dockerzhang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push: new 2d68ac32b2 [INLONG-9256][Dashboard] Data synchronization iceberg sink supports append Mode (#9257) 2d68ac32b2 is described below commit 2d68ac32b2c119df00bcecc6d98c81e43bc8b7d7 Author: Lizhen <88174078+bluew...@users.noreply.github.com> AuthorDate: Fri Nov 10 18:04:20 2023 +0800 [INLONG-9256][Dashboard] Data synchronization iceberg sink supports append Mode (#9257) --- .../src/plugins/sinks/defaults/Iceberg.ts | 22 ++++++++++++++++++++++ inlong-dashboard/src/ui/locales/cn.json | 1 + inlong-dashboard/src/ui/locales/en.json | 11 ++++++----- .../src/ui/pages/GroupDetail/DataStream/helper.ts | 6 +++++- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts b/inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts index c2c35b2ca8..8cc88bc1e9 100644 --- a/inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts +++ b/inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts @@ -196,6 +196,28 @@ export default class IcebergSink @I18n('meta.Sinks.Iceberg.FileFormat') fileFormat: string; + @FieldDecorator({ + type: 'radio', + rules: [{ required: true }], + props: values => ({ + disabled: [110].includes(values?.status), + options: [ + { + label: 'append', + value: 'APPEND', + }, + { + label: 'upsert', + value: 'UPSERT', + }, + ], + }), + }) + @ColumnDecorator() + @SyncField() + @I18n('meta.Sinks.Iceberg.AppendMode') + appendMode: string; + @FieldDecorator({ type: EditableTable, initialValue: [], diff --git a/inlong-dashboard/src/ui/locales/cn.json b/inlong-dashboard/src/ui/locales/cn.json index c6b471a58b..8e78343c4e 100644 --- a/inlong-dashboard/src/ui/locales/cn.json +++ b/inlong-dashboard/src/ui/locales/cn.json @@ -201,6 +201,7 @@ "meta.Sinks.Iceberg.DbName": "DB 名称", "meta.Sinks.Iceberg.TableName": "表名称", "meta.Sinks.Iceberg.FileFormat": "⽂件格式", + "meta.Sinks.Iceberg.AppendMode": "附加模式", "meta.Sinks.Iceberg.Description": "表描述", "meta.Sinks.Iceberg.ExtList": "属性", "meta.Sinks.Iceberg.DataConsistency": "数据一致性", diff --git a/inlong-dashboard/src/ui/locales/en.json b/inlong-dashboard/src/ui/locales/en.json index 4fb40ea47f..e6fe8056a2 100644 --- a/inlong-dashboard/src/ui/locales/en.json +++ b/inlong-dashboard/src/ui/locales/en.json @@ -198,12 +198,13 @@ "meta.Sinks.Kafka.SerializationType": "SerializationType", "meta.Sinks.Kafka.PartitionNum": "PartitionNum", "meta.Sinks.Kafka.AutoOffsetReset": "AutoOffsetReset", - "meta.Sinks.Iceberg.DbName": "DbName", - "meta.Sinks.Iceberg.TableName": "TableName", - "meta.Sinks.Iceberg.FileFormat": "FileFormat", + "meta.Sinks.Iceberg.DbName": "Db name", + "meta.Sinks.Iceberg.TableName": "Table name", + "meta.Sinks.Iceberg.FileFormat": "File format", + "meta.Sinks.Iceberg.AppendMode": "Append mode", "meta.Sinks.Iceberg.Description": "Description", - "meta.Sinks.Iceberg.ExtList": "ExtList", - "meta.Sinks.Iceberg.DataConsistency": "DataConsistency", + "meta.Sinks.Iceberg.ExtList": "Ext list", + "meta.Sinks.Iceberg.DataConsistency": "Data consistency", "meta.Sinks.Iceberg.FieldName": "FieldName", "meta.Sinks.Iceberg.FieldNameRule": "At the beginning of English letters or underscore, only English letters, numbers, and underscores", "meta.Sinks.Iceberg.FieldType": "FieldType", diff --git a/inlong-dashboard/src/ui/pages/GroupDetail/DataStream/helper.ts b/inlong-dashboard/src/ui/pages/GroupDetail/DataStream/helper.ts index b678af03e5..a68c5f9003 100644 --- a/inlong-dashboard/src/ui/pages/GroupDetail/DataStream/helper.ts +++ b/inlong-dashboard/src/ui/pages/GroupDetail/DataStream/helper.ts @@ -56,9 +56,13 @@ export const dataToValues = data => { const output = { ...data, ...fieldList, - predefinedFields: stringToData(data?.predefinedFields), }; + if (data?.predefinedFields !== undefined) { + const predefinedFields = stringToData(data?.predefinedFields); + output.predefinedFields = predefinedFields; + } + return output; };