diff --git a/internal/dms/biz/cloudbeaver.go b/internal/dms/biz/cloudbeaver.go index 8d6b4ccb..667d5439 100644 --- a/internal/dms/biz/cloudbeaver.go +++ b/internal/dms/biz/cloudbeaver.go @@ -1703,6 +1703,11 @@ func (cu *CloudbeaverUsecase) GenerateCloudbeaverConnectionParams(dbService *DBS err = cu.fillOceanBaseParams(dbService, config) case constant.DBTypeGoldenDB: err = cu.fillGoldenDBParams(config) + case constant.DBTypeHive: + err = cu.fillHive4Params(config) + case constant.DBTypeDM: + err = cu.fillDMParams(config) + default: return nil, fmt.Errorf("temporarily unsupported instance types") } @@ -1799,6 +1804,16 @@ func (cu *CloudbeaverUsecase) fillGoldenDBParams(config map[string]interface{}) return nil } +func (cu *CloudbeaverUsecase) fillHive4Params(config map[string]interface{}) error { + config["driverId"] = "hive:apache_hive4" + return nil +} + +func (cu *CloudbeaverUsecase) fillDMParams(config map[string]interface{}) error { + config["driverId"] = "generic:dameng_jdbc" + return nil +} + func (cu *CloudbeaverUsecase) getGraphQLClientWithRootUser() (*cloudbeaver.Client, error) { adminUser := cu.cloudbeaverCfg.AdminUser diff --git a/internal/dms/pkg/constant/const.go b/internal/dms/pkg/constant/const.go index cb682c61..8a468b02 100644 --- a/internal/dms/pkg/constant/const.go +++ b/internal/dms/pkg/constant/const.go @@ -239,6 +239,10 @@ func ParseDBType(s string) (DBType, error) { return DBTypeGoldenDB, nil case "TBase": return DBTypeTBase, nil + case "Hive": + return DBTypeHive, nil + case "DM": + return DBTypeDM, nil default: return "", fmt.Errorf("invalid db type: %s", s) } @@ -255,6 +259,8 @@ const ( DBTypeTDSQLForInnoDB DBType = "TDSQL For InnoDB" DBTypeGoldenDB DBType = "GoldenDB" DBTypeTBase DBType = "TBase" + DBTypeHive DBType = "Hive" + DBTypeDM DBType = "达梦(DM)" ) var SupportedDataExportDBTypes = map[DBType]struct{}{