Updated on 2022-09-23 GMT+08:00

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.

This parameter can be set to a regular expression to export all databases that meet the rule. For example, if Table Name is set to user_[0-9]{1,2}, tables from user_0 to user_9 and from user_00 to user_99 are matched.

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. For details, see Incremental Synchronization Using the Macro Variables of Date and Time.

This parameter can be set to a regular expression to export all databases that meet the rule.

NOTE:

If you have configured a macro variable of date and time and schedule a CDM job through DataArts Studio DataArts Factory, the system replaces the macro variable of date and time with (Planned start time of the data development jobOffset) rather than (Actual start time of the CDM jobOffset).

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. For details, see Incremental Migration of Relational Databases.

NOTE:

If you have configured a macro variable of date and time and schedule a CDM job through DataArts Studio DataArts Factory, the system replaces the macro variable of date and time with (Planned start time of the data development jobOffset) rather than (Actual start time of the CDM jobOffset).

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

  • 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)}