Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions internal/dms/biz/cloudbeaver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions internal/dms/pkg/constant/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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{}{
Expand Down