From a Database Shard

If the source link of a job is the Link to a Database Shard, configure the source job parameters based on Table 1.

Table 1 Parameter description

Category

Parameter

Description

Example Value

Basic parameters

Schema/Tablespace

Indicates the name of the schema or tablespace from which data is to be extracted. Click the icon next to the text box to go to the page for selecting a schema or tablespace. During a sharded link job, the tablespace corresponding to the first backend link is displayed by default. You can also enter a schema or tablespace name.

If the desired schema or tablespace is not displayed, check whether the login account has the permissions required to query metadata.

Note

The parameter value can contain wildcard characters (*), which is used to export all databases whose names start with a certain prefix or end with a certain suffix. For example:

  • SCHEMA* indicates that all databases whose names starting with SCHEMA are exported.

  • *SCHEMA indicates that all databases whose names ending with SCHEMA are exported.

  • *SCHEMA* indicates that all databases whose names containing SCHEMA are exported.

SCHEMA_E

Table Name

Indicates the name of the table from which data is to be extracted. Click the icon next to the text box to go to the page for selecting the table or directly enter a table name.

If the desired table is not displayed, confirm that the table exists or that the login account has the permissions required to query metadata.

This parameter can be configured as a macro variable of date and time and a path name can contain multiple macro variables. When the macro variable of date and time works with a scheduled job, the incremental data can be synchronized periodically.

Note

The table name can contain wildcard characters (*), which is used to export all tables whose names start with a certain prefix or end with a certain suffix. The number and types of fields in the tables must be the same. The examples are as follows:

  • table* indicates that all tables whose names starting with table are exported.

  • *table indicates that all tables whose names ending with table are exported.

  • *table* indicates that all tables whose names containing table are exported.

table

Advanced attributes

WHERE Clause

Specifies the data extraction range. If this parameter is not set, the entire table is extracted.

You can set a date macro variable to extract data generated on a specific date.

DS='${dateformat(yyyy-MM-dd,-1,DAY)}'

Note

  • If the Source Link Name is the backend link of the sharded link, the job is a common MySQL job.

  • When creating a job whose source end is a sharded link, you can add a custom field with the sample value of ${custom(host)} to the source field during field mapping. This field is used to view the data source of the table after the data of multiple tables across databases is migrated to the same table. The following sample values are supported:

    • ${custom(host)}

    • ${custom(database)}

    • ${custom(fromLinkName)}

    • ${custom(schemaName)}

    • ${custom(tableName)}