Skip to content

Commit 27e0f53

Browse files
committed
fix: map DMS Hive DBType to ODC HIVE ConnectType in datasource sync
Add Hive case to convertDBType switch so that DMS datasources of type "Hive" are correctly mapped to ODC ConnectType "HIVE" during datasource synchronisation. Update comment to list current ODC ConnectType enum values. Refs: actiontech/dms-ee#871
1 parent f8fb414 commit 27e0f53

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

internal/sql_workbench/service/sql_workbench_service.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,8 @@ func (sqlWorkbenchService *SqlWorkbenchService) buildUpdateDatasourceRequest(ctx
945945
// convertDBType 转换数据库类型
946946
func (sqlWorkbenchService *SqlWorkbenchService) convertDBType(dmsDBType string) string {
947947
// 这里需要根据实际的数据库类型映射关系进行转换
948-
// ODC目前支持的数据源有: OB_MYSQL, OB_ORACLE, ORACLE, MYSQL, ODP_SHARDING_OB_MYSQL, DORIS, POSTGRESQL, GAUSSDB
949-
// 其余调用创建数据源接口会直接失败
948+
// ODC ConnectType 枚举值: OB_MYSQL, OB_ORACLE, ORACLE, MYSQL, ODP_SHARDING_OB_MYSQL,
949+
// DORIS, POSTGRESQL, HIVE, DM, TIDB, SQL_SERVER, MONGODB, GAUSSDB 等
950950
switch dmsDBType {
951951
case "MySQL":
952952
return "MYSQL"
@@ -966,6 +966,8 @@ func (sqlWorkbenchService *SqlWorkbenchService) convertDBType(dmsDBType string)
966966
return "DM"
967967
case "TiDB":
968968
return "TIDB"
969+
case "Hive":
970+
return "HIVE"
969971
case "TDSQL For InnoDB":
970972
return "MYSQL"
971973
case "GoldenDB":

0 commit comments

Comments
 (0)