Updated on 2024-10-24 GMT+08:00

Shard Link Parameters

Sharding refers to the link to multiple backend data sources at the same time. The link can be used as the job source to migrate data from multiple data sources to other data sources. Table 1 lists the link parameters.

Do not change the password or user when the job is running. If you do so, the password will not take effect immediately and the job will fail.

Table 1 Database shard link parameters

Parameter

Description

Example Value

Name

Link name, which should be defined based on the data source type, so it is easier to remember what the link is for

my_link

Username

Username used for accessing the database

For a backend database A, this configuration takes effect only when no username and password are configured for A in the data source list. For a backend database B that has configured the username and password, this configuration does not takes effect.

cdm

Password

Password used for accessing the database.

For a backend database A, this configuration takes effect only when no username and password are configured for A in the data source list. For a backend database B that has configured the username and password, this configuration does not takes effect.

-

Use Agent

The agent function will be unavailable soon and does not need to be configured.

-

Agent

The agent function will be unavailable soon and does not need to be configured.

-

backendDatasource

Enter the type of the backend database. Currently, only MySQL is supported.

MySQL

Data Source List

Enter the IP address, port number, database name, account name, and password of the backend database, and separate them with colons (:). That is, ip:port:dbs:username:password. You can leave username:password empty. In this case, the username and password are used.

If there are multiple backend databases, ensure that the table structures are the same and use vertical bars (|) to separate data sources. If the password contains a vertical bar (|) or colon (:), use a backslash (\) to escape the vertical bar.

For example, 192.168.3.0:3306:cdm|192.168.2.2:3306:cdm:user:password indicates that the IP address of the first backend database is 192.168.3.0, the port number is 3306, the database name is cdm, and the account name and password are configured in user and password. The IP address of the second backend database is 192.168.2.2, the port number is 3306, the database name is cdm, the account name is user and the password is password.

192.168.3.0:3306:cdm|192.168.2.2:3306:cdm:user:password

Fetch Size

(Optional) Displayed when you click Show Advanced Attributes.

Number of rows obtained by each request. Set this parameter based on the data source and the job's data size. If the value is either too large or too small, the job may run for a long time.

1000

Link Attributes

(Optional) Click Add to add the JDBC connector attributes of multiple specified data sources. For details, see the JDBC connector document of the corresponding database.

sslmode=require

Reference Sign

(Optional) Delimiter between the names of the referenced tables or columns. For details, see the product documentation of the corresponding database.

'