PolarDB O
Updated at:
Connect DataWorks Data Integration to a PolarDB for Oracle cluster by configuring a data source with the type polardbo. Two connection modes are supported: instance mode and connection string mode.
Choose a connection mode
| Mode | When to use |
|---|---|
| Instance mode | The cluster runs on Alibaba Cloud and you connect using its instance ID. Supports both same-account and cross-account access. |
| Connection string mode | You have a direct host and port address for the cluster endpoint. |
Parameters
Data source type: polardbo
Supported connection modes (ConnectionPropertiesMode): InstanceMode, UrlMode
Instance mode — current Alibaba Cloud account
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
regionId |
String | Yes | cn-shanghai |
The region where the PolarDB for Oracle cluster is deployed. |
instanceId |
String | Yes | pc-2ze82jv51re2990g5 |
The ID of the PolarDB for Oracle cluster. |
database |
String | Yes | mysql_database |
The name of the database. |
username |
String | Yes | xxxxx |
The username used to connect to the database. |
password |
String | Yes | xxxxx |
The password for the database user. |
envType |
String | Yes | Dev |
The environment type of the data source. Valid values: Dev (development environment), Prod (production environment). |
Instance mode — another Alibaba Cloud account
Use this mode when the PolarDB for Oracle cluster belongs to a different Alibaba Cloud account. Cross-account access requires a RAM role granted by the owning account.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
regionId |
String | Yes | cn-shanghai |
The region where the PolarDB for Oracle cluster is deployed. |
instanceId |
String | Yes | pc-2ze82jv51re2990g5 |
The ID of the PolarDB for Oracle cluster. |
database |
String | Yes | polardbx_database |
The name of the database. |
username |
String | Yes | xxxxx |
The username used to connect to the database. |
password |
String | Yes | xxxxx |
The password for the database user. |
crossAccountOwnerId |
String | Yes | 123123123 |
The ID of the Alibaba Cloud account that owns the cluster. |
crossAccountRoleName |
String | Yes | cross-role |
The name of the RAM role in the owning account that grants cross-account access. |
envType |
String | Yes | Dev |
The environment type of the data source. Valid values: Dev (development environment), Prod (production environment). |
Connection string mode
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
address |
Array | Yes | [{"host": "127.0.0.1", "port": 3306}] |
The endpoint of the cluster. Accepts a single host-port pair. |
database |
String | Yes | polardbx_database |
The name of the database. |
username |
String | Yes | xxxxx |
The username used to connect to the database. |
password |
String | Yes | xxxxx |
The password for the database user. |
envType |
String | Yes | Dev |
The environment type of the data source. Valid values: Dev (development environment), Prod (production environment). |
properties |
JSON Object | No | {"useSSL": "false"} |
Additional JDBC driver properties. |
Configuration examples
Instance mode — current Alibaba Cloud account
{
"envType": "Prod",
"ownerId": "1107550004253538",
"regionId": "cn-beijing",
"instanceId": "pxc-bjrikym49rir1s",
"database": "my_database",
"username": "my_username",
"password": "my_password",
"properties": {
"socketTimeout": "2000"
}
}
Instance mode — another Alibaba Cloud account
{
"envType": "Prod",
"regionId": "cn-beijing",
"instanceId": "pxc-bjrikym49rir1s",
"database": "my_database",
"username": "my_username",
"password": "my_password",
"crossAccountOwnerId": "123123123",
"crossAccountRoleName": "cross-role",
"properties": {
"socketTimeout": "2000"
}
}
Connection string mode
{
"envType": "Prod",
"address": [
{
"host": "127.0.0.1",
"port": "3306"
}
],
"database": "my_database",
"username": "my_username",
"password": "my_password",
"properties": {
"socketTimeout": "2000"
}
}
Is this page helpful?