Skip to content

Commit 08043c5

Browse files
Merge pull request #568 from actiontech/feat-cb-dameng
Feat cb dameng
2 parents 4b505a1 + fb07537 commit 08043c5

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

internal/dms/biz/cloudbeaver.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,6 +1703,11 @@ func (cu *CloudbeaverUsecase) GenerateCloudbeaverConnectionParams(dbService *DBS
17031703
err = cu.fillOceanBaseParams(dbService, config)
17041704
case constant.DBTypeGoldenDB:
17051705
err = cu.fillGoldenDBParams(config)
1706+
case constant.DBTypeHive:
1707+
err = cu.fillHive4Params(config)
1708+
case constant.DBTypeDM:
1709+
err = cu.fillDMParams(config)
1710+
17061711
default:
17071712
return nil, fmt.Errorf("temporarily unsupported instance types")
17081713
}
@@ -1799,6 +1804,16 @@ func (cu *CloudbeaverUsecase) fillGoldenDBParams(config map[string]interface{})
17991804
return nil
18001805
}
18011806

1807+
func (cu *CloudbeaverUsecase) fillHive4Params(config map[string]interface{}) error {
1808+
config["driverId"] = "hive:apache_hive4"
1809+
return nil
1810+
}
1811+
1812+
func (cu *CloudbeaverUsecase) fillDMParams(config map[string]interface{}) error {
1813+
config["driverId"] = "generic:dameng_jdbc"
1814+
return nil
1815+
}
1816+
18021817
func (cu *CloudbeaverUsecase) getGraphQLClientWithRootUser() (*cloudbeaver.Client, error) {
18031818
adminUser := cu.cloudbeaverCfg.AdminUser
18041819

internal/dms/pkg/constant/const.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ func ParseDBType(s string) (DBType, error) {
239239
return DBTypeGoldenDB, nil
240240
case "TBase":
241241
return DBTypeTBase, nil
242+
case "Hive":
243+
return DBTypeHive, nil
244+
case "DM":
245+
return DBTypeDM, nil
242246
default:
243247
return "", fmt.Errorf("invalid db type: %s", s)
244248
}
@@ -255,6 +259,8 @@ const (
255259
DBTypeTDSQLForInnoDB DBType = "TDSQL For InnoDB"
256260
DBTypeGoldenDB DBType = "GoldenDB"
257261
DBTypeTBase DBType = "TBase"
262+
DBTypeHive DBType = "Hive"
263+
DBTypeDM DBType = "达梦(DM)"
258264
)
259265

260266
var SupportedDataExportDBTypes = map[DBType]struct{}{

0 commit comments

Comments
 (0)