MariaDB

Updated at:

Configures a MariaDB data source in DataWorks using connection string mode (UrlMode).

Property definition

  • Data source type: mariadb

  • Supported configuration mode (ConnectionPropertiesMode): UrlMode

Connection string mode

Parameter

Type

Required

Example

Description

address

JSON Array

Yes

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

The host and port of the MariaDB instance, specified as a JSON array. The array accepts only a single host-port pair.

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 of the database user.

properties

JSON Object

No

{"useSSL": "false"}

Additional driver properties, specified as key-value pairs.

envType

String

Yes

Dev

The environment of the data source. Valid values: Dev (development environment), Prod (production environment).

Configuration examples

Connection string mode

{
    "address": [
        {
            "host": "127.0.0.1",
            "port": 3306
        }
    ],
    "database": "db",
    "properties": {
        "connectTimeout": "2000"
    },
    "username": "xxxxx",
    "password": "xxxxx",
    "envType": "Dev"
}