GetDISyncTask

Updated at:

Queries the details of Data Integration real-time synchronization tasks and synchronization solutions.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the ID.

This parameter specifies the DataWorks workspace used for this API call.

10000

TaskType

string

Yes

The type of the Data Integration synchronization task associated with the destination data source. Valid values:

  • DI_REALTIME: Data Integration real-time synchronization task

  • DI_SOLUTION: Data Integration synchronization solution

DI_REALTIME

FileId

integer

Yes

  • If TaskType is set to DI_REALTIME, FileId is the file ID of the real-time synchronization task.

  • If TaskType is set to DI_SOLUTION, FileId is the task ID of the synchronization solution.

You can call the ListFiles operation to obtain the task ID.

100

Response elements

Element

Type

Description

Example

object

The return result of the Data Integration task query.

Success

boolean

Indicates whether the request is successful. Valid values:

  • True: The request is successful.

  • False: The request fails.

true

RequestId

string

The request ID. You can use the ID to locate logs and troubleshoot issues.

0bc1411515937635973****

Data

object

The return result of the Data Integration task query.

Code

string

  • If TaskType is set to DI_REALTIME, the details of the real-time synchronization task are returned.

  • If TaskType is set to DI_SOLUTION, the value is null.

{"extend":{"mode":"wizard","resourceGroup":"S_res_group_287114642182658_1560324290517"},"nodeDef":{},"order":{"hops":[{"from":"datahub_8htXSsfiS2vtZCVG","to":"datahub_CRHBAyGfhSaLmv2f"}]},"setting":{"errorLimit":{},"jvmOption":""},"steps":[{"stepType":"datahub","category":"writer","displayName":"DataHub1","parameter":{"batchSize":1000,"datasource":"datahub_cloud_dev_test","topic":"dwd_tfc_opt_speed_rid_amap_rt"},"name":"datahub_CRHBAyGfhSaLmv2f","gui":{"x":262,"y":325}},{"stepType":"datahub","displayName":"DataHub2","parameter":{"datasource":"datahub_uric_test","topic":"dwd_tfc_opt_speed_rid_amap_rt_330000","batchSize":1000},"name":"datahub_8htXSsfiS2vtZCVG","gui":{"x":268,"y":160.5},"category":"writer"}]}

Status

string

The result of querying the synchronization task. A value of success indicates that the query is successful. A value of fail indicates that the query fails.

success

Message

string

The error message returned if the Data Integration synchronization task fails to be queried.

If the task is successfully queried, this parameter is empty.

fileId:[100] is invalid.

AlarmList

array<object>

The array of alert rules associated with the real-time task.

array<object>

An alert rule associated with the real-time task.

Id

integer

The ID of the alert rule.

45242

Enabled

boolean

Indicates whether the alert rule is enabled.

true

RuleName

string

The name of the alert rule.

Delay alert rule name 1

Metric

string

The alert type. Valid values:

  • taskStatus: task status

  • bizDelay: business latency

  • taskFailoverCount: failover monitoring

  • ddlUnsupport: unsupported DDL

  • ddlReport: DDL notification

  • totalDirtyRecordWriteInLines: dirty data

taskStatus

Description

string

The description of the alert rule.

Description

AlarmRuleList

array<object>

The array of alert notification configurations.

object

The alert notification configuration.

Level

string

The alert level. Valid values:

  • WARNING: warning alert

  • CRITICAL: critical alert

WARNING

Comparator

string

The comparison operator, which specifies the comparison method between the metric and the alert rule. Valid values:

  • '='

  • '<'

  • '>'

=

Threshold

integer

The threshold used to compare the metric with the alert rule.

1

Duration

integer

The duration. An alert is triggered only if the condition is met for the specified duration. Unit: minutes.

3

Aggregator

string

The calculation method for the metric. Valid values:

  • avg: average value in the interval

  • max: maximum value in the interval

avg

NotifyRule

object

The array of alert notification rules.

Interval

integer

The alert interval. Unit: minutes.

5

Warning

array

The list of warning-level alert notifications.

string

The notification channel. Valid values:

  • Mail: email

  • Phone: phone call

  • Sms: text message

  • Ding: DingTalk

Ding

Critical

array

The list of critical-level alert notifications.

string

The notification channel. Valid values:

  • Mail: email

  • Phone: phone call

  • Sms: text message

  • Ding: DingTalk

Ding

SolutionDetail

object

  • If TaskType is set to DI_REALTIME, the value is null.

  • If TaskType is set to DI_SOLUTION, the details of the synchronization solution task are returned.

Status

string

The execution status of the synchronization solution. Valid values:

  • 0: successful

  • 1: not running

  • 2: running

  • 3: failed

  • 4: committed

  • 5: pending manual confirmation

  • 6: manual confirmation completed

  • 7: other

  • 8: waiting

  • 9: deleted

0

Type

string

The type of the synchronization solution task.

holo

StartTime

string

The start time of the synchronization solution task.

The time is in the yyyy-MM-dd HH:mm:ss format, such as 2021-12-07 14:40:51.

2021-12-07 14:40:51

CreatorName

string

The name of the creator of the synchronization solution task.

dataworks_di

ProjectId

integer

The ID of the project to which the synchronization solution task belongs.

10000

SourceType

string

The type of the source for the synchronization solution task.

mysql

ProcessContent

string

The configuration details of the synchronization solution.

{"holoDatasource":"holo","offlineSyncConfig":{"nodeNameRule":"oneclick_holo_di_${db_table_name_src}_to_${db_table_name_dest}","resourceGroup":"group_219193793999490"},"processRuleId":1007,"readerConcurrent":10,"realtimeSyncConfig":{"content":{"order":{"hops":[{"from":"reader","to":"writer"}]},"setting":{"speed":{"readerConcurrent":10}},"steps":[{"stepType":"mysql","name":"reader","category":"reader","parameter":{"connection":[{"datasource":"mm","datasourceType":"mysql","table":[]}]}},{"stepType":"holo","name":"writer","category":"writer","parameter":{"datasource":"holo","writeMode":"replay","datasourceSchema":"public","tableMappingRule":{"datasource":[{"tableRule":[],"srcDatasourceName":"mm"}]}}}]},"extend":{"mode":"migration_holo","resourceGroup":"group_219193793999490"}},"setting":{"autoCreateWorkflow":true,"userDefinedFileNameExpression":"oneclick"},"srcType":"mysql","tableMappingRuleFromRealtimeSyncConfig":{"datasource":[{"srcDatasourceName":"mm","tableRule":[]}]}}

Name

string

The name of the synchronization solution task.

holo_20211206161025

ProcessExtra

string

The additional parameters of the synchronization solution task.

{"processType":"new","tableNum":300}

SubmitTime

string

The time when the synchronization solution task was committed.

The time is in the yyyy-MM-dd HH:mm:ss format, such as 2021-12-07 14:40:51.

2021-12-07 14:40:51

Id

integer

The ID of the synchronization solution task.

100

Examples

Success response

JSON format

{
  "Success": true,
  "RequestId": "0bc1411515937635973****\t",
  "Data": {
    "Code": "{\"extend\":{\"mode\":\"wizard\",\"resourceGroup\":\"S_res_group_287114642182658_1560324290517\"},\"nodeDef\":{},\"order\":{\"hops\":[{\"from\":\"datahub_8htXSsfiS2vtZCVG\",\"to\":\"datahub_CRHBAyGfhSaLmv2f\"}]},\"setting\":{\"errorLimit\":{},\"jvmOption\":\"\"},\"steps\":[{\"stepType\":\"datahub\",\"category\":\"writer\",\"displayName\":\"DataHub1\",\"parameter\":{\"batchSize\":1000,\"datasource\":\"datahub_cloud_dev_test\",\"topic\":\"dwd_tfc_opt_speed_rid_amap_rt\"},\"name\":\"datahub_CRHBAyGfhSaLmv2f\",\"gui\":{\"x\":262,\"y\":325}},{\"stepType\":\"datahub\",\"displayName\":\"DataHub2\",\"parameter\":{\"datasource\":\"datahub_uric_test\",\"topic\":\"dwd_tfc_opt_speed_rid_amap_rt_330000\",\"batchSize\":1000},\"name\":\"datahub_8htXSsfiS2vtZCVG\",\"gui\":{\"x\":268,\"y\":160.5},\"category\":\"writer\"}]}",
    "Status": "success",
    "Message": "fileId:[100] is invalid.",
    "AlarmList": [
      {
        "Id": 45242,
        "Enabled": true,
        "RuleName": "Delay alert rule name 1",
        "Metric": "taskStatus",
        "Description": "Description",
        "AlarmRuleList": [
          {
            "Level": "WARNING",
            "Comparator": "=",
            "Threshold": 1,
            "Duration": 3,
            "Aggregator": "avg"
          }
        ],
        "NotifyRule": {
          "Interval": 5,
          "Warning": [
            "Ding"
          ],
          "Critical": [
            "Ding"
          ]
        }
      }
    ],
    "SolutionDetail": {
      "Status": "0",
      "Type": "holo",
      "StartTime": "2021-12-07 14:40:51",
      "CreatorName": "dataworks_di",
      "ProjectId": 10000,
      "SourceType": "mysql",
      "ProcessContent": "{\"holoDatasource\":\"holo\",\"offlineSyncConfig\":{\"nodeNameRule\":\"oneclick_holo_di_${db_table_name_src}_to_${db_table_name_dest}\",\"resourceGroup\":\"group_219193793999490\"},\"processRuleId\":1007,\"readerConcurrent\":10,\"realtimeSyncConfig\":{\"content\":{\"order\":{\"hops\":[{\"from\":\"reader\",\"to\":\"writer\"}]},\"setting\":{\"speed\":{\"readerConcurrent\":10}},\"steps\":[{\"stepType\":\"mysql\",\"name\":\"reader\",\"category\":\"reader\",\"parameter\":{\"connection\":[{\"datasource\":\"mm\",\"datasourceType\":\"mysql\",\"table\":[]}]}},{\"stepType\":\"holo\",\"name\":\"writer\",\"category\":\"writer\",\"parameter\":{\"datasource\":\"holo\",\"writeMode\":\"replay\",\"datasourceSchema\":\"public\",\"tableMappingRule\":{\"datasource\":[{\"tableRule\":[],\"srcDatasourceName\":\"mm\"}]}}}]},\"extend\":{\"mode\":\"migration_holo\",\"resourceGroup\":\"group_219193793999490\"}},\"setting\":{\"autoCreateWorkflow\":true,\"userDefinedFileNameExpression\":\"oneclick\"},\"srcType\":\"mysql\",\"tableMappingRuleFromRealtimeSyncConfig\":{\"datasource\":[{\"srcDatasourceName\":\"mm\",\"tableRule\":[]}]}}",
      "Name": "holo_20211206161025",
      "ProcessExtra": "{\"processType\":\"new\",\"tableNum\":300}",
      "SubmitTime": "2021-12-07 14:40:51",
      "Id": 100
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 Param.Invalid The parameter is invalid. Param invalid
500 InternalError.System An internal error occurred. InternalError
403 Forbidden.Access Access is forbidden.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.