All Products
Search
Document Center

DataWorks:StarRocks

Last Updated:Nov 07, 2024

Property definition

  • Data source type: starrocks

  • Supported configuration modes (ConnectionPropertiesMode):

    • Connection string mode (UrlMode)

    • Instance mode (InstanceMode)

Current-account instance mode

Parameter

Type

Example

Required

Description

regionId

String

cn-shanghai

Yes

The ID of the region to which the instance belongs.

instanceType

String

serverless

Yes

The instance type. Valid values:

  • emr-olap: The semi-managed mode.

  • serverless: The serverless mode.

instanceId

String

c-12345

Yes

The instance ID.

database

String

dbName

Yes

The name of the database.

username

String

srUser

Yes

The username.

password

String

srPassword

Yes

The password.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Cross-account instance mode

Parameter

Type

Example

Required

Description

regionId

String

cn-shanghai

Yes

The ID of the region to which the instance belongs.

instanceId

String

c-12345

Yes

The instance ID.

instanceType

String

serverless

Yes

The instance type. Valid values:

  • emr-olap: The semi-managed mode.

  • serverless: The serverless mode.

database

String

dbName

Yes

The name of the database.

crossAccountOwnerId

String

1150698034967265

Yes

The ID of another Alibaba Cloud account.

crossAccountRoleName

String

mc-accross-role-name

Yes

The name of the RAM role assumed by another Alibaba Cloud account.

username

String

srUser

Yes

The username.

password

String

srPassword

Yes

The password.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Connection string mode

Parameter

Type

Example

Required

Description

database

String

dbName

Yes

The name of the database.

username

String

srUser

Yes

The username.

password

String

srPassword

Yes

The password.

properties

JSON

{

"connectTimeout": "2000"

}

No

The key-value pairs of a connection.

address

JSON Array

[
    {
        "host": "127.0.0.1",
        "port": 3306
    }
]

Yes

The address, which is configured in the JSON array format but contains only a single pair of host and port.

loadAddress

JSON Array

[
    {
        "host": "127.0.0.1",
        "port": 3306
    }
]

Yes

The address, which is configured in the JSON array format and can contain one or more pairs of host and port.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Configuration examples

Current-account instance mode

{
    "envType": "Prod",
    "instanceType": "serverless",
    "regionId": "cn-shanghai",
    "instanceId": "c-107e2047ef787c2e",
    "database": "my_database",
    "username": "xxxxx",
    "password": "xxxxx"
}

Cross-account instance mode

{
    "envType": "Prod",
    "instanceType": "serverless",
    "regionId": "cn-shanghai",
    "instanceId": "c-107e2047ef787c2e",
    "database": "my_database",
    "username": "xxxxx",
    "password": "xxxxx",
    "crossAccountRoleName": "cross-role",
    "crossAccountOwnerId": "123123123"
}

Connection string mode

{
    "envType": "Prod",
    "address": [
        {
            "host": "127.0.0.1",
            "port": 3306
        }
    ],
    "loadAddress": [
        {
            "host": "127.0.0.1",
            "port": 3306
        }
    ],
    "database": "asdf",
    "username": "xxxxx",
    "password": "xxxxx",
    "properties": {
        "socketTimeout": 2000
    }
}