Hologres
-
Data source type:
hologres -
Supported ConnectionPropertiesMode:
InstanceMode
DataWorks connects to Hologres using instance mode. Three access modes are supported — pick the one that matches how your task accesses the instance:
| Mode | When to use |
|---|---|
| Current-account access | The task runs under your own Alibaba Cloud account or a RAM user/role within it |
| Cross-account access | The Hologres instance belongs to a different Alibaba Cloud account |
| AccessKey | You want to authenticate with a static AccessKey ID and secret |
Prerequisites
Before you begin, ensure that you have:
-
The region ID where your Hologres instance is deployed (for example,
cn-shanghai) -
The Hologres instance ID — find it on the Hologres console instance list (for example,
hgpostcn-cn-uqm3epqow002) -
The name of the Hologres database you want to connect to
-
(Optional) The name of the virtual warehouse in the instance — defaults to
init_warehouse
Current-account access mode
Use this mode when the task runs under your own Alibaba Cloud account or an identity (RAM user or RAM role) within it.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
regionId |
String | Yes | cn-shanghai |
The region where the Hologres instance is deployed |
instanceId |
String | Yes | hgpostcn-cn-uqm3epqow002 |
The Hologres instance ID |
database |
String | Yes | holo_db |
The Hologres database name |
warehouseName |
String | No | init_warehouse |
The virtual warehouse in the instance. Default: init_warehouse |
authType |
String | Yes | Executor |
The identity used to access the data source. Not case-sensitive. Valid values: Executor, PrimaryAccount, SubAccount, RamRole |
authIdentity |
String | No | 1150698034967265 |
The Alibaba Cloud account ID of the task submitter. Find this ID on the Alibaba Cloud console under account settings |
securityProtocol |
String | No | authTypeNone |
SSL configuration. Valid values: authTypeNone (SSL disabled), authTypeSsl (SSL enabled) |
sslMode |
String | No | require |
SSL verification mode. Valid value: require |
envType |
String | Yes | Dev |
The environment type. Valid values: Dev (development), Prod (production) |
`authType` values:
| Value | Identity |
|---|---|
Executor |
The executor in the development environment |
PrimaryAccount |
The Alibaba Cloud account used in the production environment |
SubAccount |
A specified RAM user in the production environment |
RamRole |
A specified RAM role in the production environment |
Cross-account access mode
Use this mode when the Hologres instance belongs to a different Alibaba Cloud account. Set authType to RamRole and provide the cross-account owner ID and role name.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
regionId |
String | Yes | cn-shanghai |
The region where the Hologres instance is deployed. Note: This value is not available in the historical data of non-engine data sources created earlier. |
instanceId |
String | Yes | hgpostcn-cn-uqm3epqow002 |
The Hologres instance ID |
database |
String | Yes | holo_db |
The Hologres database name |
warehouseName |
String | No | init_warehouse |
The virtual warehouse in the instance. Default: init_warehouse. Note: If a virtual warehouse is configured, downstream findConnection calls append @<virtual warehouse name> to the database parameter. Example: "database": "holo_demo@<virtual warehouse name>". |
authType |
String | Yes | RamRole |
The access identity. Set to RamRole |
crossAccountOwnerId |
String | Yes | 1150698034967265 |
The ID of the Alibaba Cloud account that owns the Hologres instance. Find this on the account settings page of the other account |
crossAccountRoleName |
String | Yes | holo-accross-role-name |
The name of the RAM role in the other account that grants cross-account access |
securityProtocol |
String | No | authTypeNone |
SSL configuration. Valid values: authTypeNone (SSL disabled), authTypeSsl (SSL enabled) |
sslMode |
String | No | require |
SSL verification mode. Valid values: null (no verification), require (verification required) |
envType |
String | Yes | Dev |
The environment type. Valid values: Dev (development), Prod (production) |
AccessKey mode
Use this mode when you want to authenticate with a static AccessKey ID and AccessKey secret. Set authType to Ak.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
regionId |
String | Yes | cn-shanghai |
The region where the Hologres instance is deployed |
instanceId |
String | Yes | hgpostcn-cn-uqm3epqow002 |
The Hologres instance ID |
database |
String | Yes | holo_db |
The Hologres database name |
authType |
String | Yes | Ak |
The access identity. Set to Ak |
accessId |
String | Yes | xxxxx |
The AccessKey ID |
accessKey |
String | Yes | xxxxx |
The AccessKey secret |
securityProtocol |
String | No | authTypeNone |
SSL configuration. Valid values: authTypeNone (SSL disabled), authTypeSsl (SSL enabled) |
sslMode |
String | No | require |
SSL verification mode. Valid values: null (no verification), require (verification required) |
envType |
String | Yes | Dev |
The environment type. Valid values: Dev (development), Prod (production) |
Configuration examples
Executor access mode
{
"database": "database",
"instanceId": "hgpostcn-cn-nwy3ef51g001",
"securityProtocol": "authTypeNone",
"regionId": "cn-beijing",
"envType": "Dev",
"dsVersion": "2",
"authType": "Executor"
}
Cross-account access mode
{
"crossAccountOwnerId": "1150698034967265",
"crossAccountRoleName": "holo-accross-role-name",
"database": "database",
"instanceId": "hgpostcn-cn-nwy3ef51g001",
"securityProtocol": "authTypeNone",
"regionId": "cn-beijing",
"envType": "Dev",
"authType": "RamRole"
}
AccessKey mode
{
"accessId": "xxxxx",
"accessKey": "***",
"database": "testdb",
"instanceId": "hgpostcn-cn-uqm3epqow002",
"securityProtocol": "AuthTypeNone",
"regionId": "cn-shanghai",
"envType": "Prod",
"authType": "Ak"
}