All Products
Search
Document Center

DataWorks:Development reference: Event lists and message formats

Last Updated:May 23, 2025

This topic describes the event types, the formats of event messages, and the meaning of each field in an event message in DataWorks.

Background

In DataWorks, events are classified into regular events and extension point events based on whether the operation process related to an event in DataWorks can be blocked and whether the processing result of an event message can be returned after a self-managed service subscribes to the event message.

  • Regular events: You can subscribe to these event messages, but they do not support blocking operations in DataWorks. You can subscribe to these event messages by using OpenEvent. For more information, see Open events (OpenEvent).

  • Extension point events: After you subscribe to these event messages, you can customize the responses to the event messages by using the extension feature of the DataWorks open platform. When you use Extensions to control operations related to extension points, operations performed by DataWorks users on the platform for extension points are interrupted until your custom extension returns a processing result.

This list classifies the events supported by each module and the event types (regular events or extension point events) by module, and lists the EventBridge event type (Type) and extension event code (eventCode).

  • EventBridge event type (Type): The field used to filter event messages. For more information, see Enable message subscription.

  • Extension event code (eventCode): The event code that corresponds to the event type. During local development, this code can be obtained from the message content sent by DataWorks to determine the target event type.

Workspace-level events

Space-level modules generate space-level events, such as event messages produced by node execution in the Data Development module, event messages generated by status changes of recurring instances in the Operation Center module, and more. You can refer to the Event list below to understand which event messages supported by each module are regular events, which are extension point events, and the corresponding message format for sending these events.

The message format tabs below contain only partial content. For the complete messages sent to EventBridge or Function Compute, you need to refer to Appendix: Message formats.

DataStudio event list

Event list

Event type

Event (and operation that generates the event)

Regular event

Extension point event

EventBridge event type (Type)

Extension event code (eventCode)

Node change

Add a node

  • Create a node and deploy the node to the production environment

image

image

dataworks:NodeChange:NodeChangeCreated

node-change-created

Update a node

  • Modify a node in the development environment

  • Deploy the modification to the production environment

image

image

dataworks:NodeChange:NodeChangeUpdated

node-change-updated

File change

  • Node

  • Resource

  • Function

Delete a file

Delete a node in the development environment

Note

The deleted file will be moved to the recycle bin.

image

image

dataworks:FileChange:DeleteFile

delete-file

Commit a file

image

image

dataworks:FileChange:CommitFile

commit-file

Deploy a file

image

image

dataworks:FileChange:DeployFile

deploy-file

Run a file

image

image

dataworks:FileChange:RunFile

run-file

Table change

Commit a table to the development environment

image

image

dataworks:TableChange:CommitTable

commit-table

Deploy a table to the production environment

image

image

dataworks:TableChange:DeployTabl

deploy-table

Message format

Node change events (add and update)

The message body format for node add, modify, and delete events (the content of the data field in the event message) is as follows:

{
  "datacontenttype": "application/json;charset=utf-8",
  "data": {
    "nodeName": "****",
    "programType": "ODPS_SQL",
    "cronExpress": "00 04 00 * * ?",
    "blockBusiness": false,
    "schedulerType": "NORMAL",
    "ownerId": "19****735",
    "priority": 1,
    "baselineId": 70***287,
    "operator": "19***735", //The operator.
    "eventCode": "node-change-created",
    "repeatability": true,
    "modifyTime": 17***864,
    "createTime": 17***864,
    "tenantId": 28***656,
    "nodeId": 70***003,
    "projectId": 9***4
  }
}

The following table describes the fields:

Field name

Field type

Description

nodeName

String

The name of the node.

programType

String

The type of the code for the file. You can call the ListFileType operation to query the code type of the file, or view Supported node types to check the code type of the file.

cronExpress

String

The CRON expression that represents the periodic scheduling policy of the node.

This parameter corresponds to DataWorks consoleData DevelopmentScheduling Configuration > Time Properties > CRON Expression in the task in the .

After you configure Scheduling Cycle and Scheduled Time, DataWorks automatically generates the corresponding CRON expression. Examples:

  • Run the node at 05:30 every day: 00 30 05 * * ?

  • Run the node at the 15th minute of each hour: 00 15 * * * ?

  • Run the node every 10 minutes: 00 00/10 * * * ?

  • Run the node every 10 minutes from 8:00 to 17:00 every day: 00 00-59/10 8-17 * * * ?

  • Run the node at 00:20 on the first day of each month: 00 20 00 1 * ?

  • Run the node at 00:10 on January 1 and once every three months: 00 10 00 1 1-12/3 ?

  • Run the node at 00:05 every Tuesday and Friday: 00 05 00 * * 2,5

Note

Limits on CRON expressions:

  • A node can be scheduled to run at a minimum interval of 5 minutes.

  • A node can be scheduled to run at 00:05 every day at the earliest.

schedulerType

String

The scheduling type of the node. Valid values:

  • 0: NORMAL, which indicates a normal scheduling task. The scheduling system regularly runs the node.

  • 1: MANUAL, which indicates a one-time task. The scheduling system does not regularly run the node.

  • 2: PAUSE, which indicates a frozen task. The scheduling system regularly runs the node but sets the status of the node to Failed when the scheduling system starts to run the node.

  • 3: SKIP, which indicates a dry-run task. The scheduling system regularly runs the node but sets the status of the node to Succeeded when the scheduling system starts to run the node.

  • 4: SKIP_UNCHOOSE, which indicates a task that is not selected in a temporary workflow. This type of task exists only in a temporary workflow. The status of the task is directly set to Succeeded when the scheduling system starts to run the task.

  • 5: SKIP_CYCLE, which indicates a weekly or monthly task whose scheduling cycle does not arrive. The scheduling system regularly runs the node but sets the status of the node to Succeeded when the scheduling system starts to run the node.

  • 6: CONDITION_UNCHOOSE, which indicates that the ancestor node is a branch node, but the current node is not selected by the branch node. The status of the node is directly set to Succeeded.

  • 7: REALTIME_DEPRECATED, which indicates an expired auto triggered node instance that is generated in real time. The status of this type of task is directly set to Succeeded.

ownerId

String

The ID of the Alibaba Cloud account used by the owner of the node. If this parameter is not configured, the ID of the Alibaba Cloud account of the user who schedules the node is used.

priority

Integer

The priority of the task. Valid values: 1, 3, 5, 7, and 8. A larger value indicates a higher priority.

baselineId

Long

The ID of the baseline.

repeatability

Boolean

Specifies whether the node can be rerun. Valid values:

  • true: The node can be rerun.

  • false: The node cannot be rerun.

modifyTime

Long

The last time when the node was modified.

createTime

Long

The time when the node was created.

nodeId

Long

The ID of the node.

projectId

Long

The ID of the workspace to which the node belongs.

tenantId

Long

The ID of the tenant to which the node belongs.

operator

String

The UID of the user who adds, modifies, or deletes the node.

eventCode

String

The extension event code.

File change events (commit, deploy, run, and delete)

  • The message body format for file commit and deploy events (the content of the data field in the event message) is as follows:

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "fileName": "******",
        "extensionBizId": "eb******9ce",
        "changeType": "0",
        "blockBusiness": false,
        "dataSourceName": "0_******engine",
        "operator": "19***735",
        "eventCode": "commit-file",
        "fileCreateTime": "2024-07-12 11:08:50",
        "tenantId": 28***656,
        "fileOwner": "19***735",
        "fileVersion": 1,
        "projectId": 9***4,
        "fileType": 10,
        "fileId": 50***830,
        "resourceType": 1
      }
    }

    The following table describes the fields:

    Field name

    Field type

    Description

    operator

    String

    The UID of the user who commits or deploys the file.

    projectId

    Long

    The ID of the workspace to which the file belongs.

    tenantId

    Long

    The tenant ID.

    nodeId

    Long

    The ID of the auto triggered node.

    fileType

    Long

    The type of the code in the file. You can call the ListFileType operation to query the code type of the file, or view Supported node types to check the code type of the file.

    fileName

    String

    The name of the file.

    fileOwner

    String

    The owner of the file.

    extensionBizId

    String

    The ID of the check process in an extension.

    changeType

    String

    The type of the change to the file. Valid values:

    • 0: Create a file.

    • 1: Update a file.

    • 2: Delete a file.

    fileCreateTime

    String

    The creation time of the file, in the format of yyyy-MM-dd HH:mm:ss.

    fileId

    Long

    The ID of the file.

    fileVersion

    Long

    The version of the file.

    dataSourceName

    String

    The name of the data source.

    eventCode

    String

    The extension event code.

  • The message body format for file delete and run events (the content of the data field in the event message) is as follows:

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "fileName": "***",
        "extensionBizId": "bf******6e3",
        "blockBusiness": false,
        "operator": "19***735",
        "eventCode": "delete-file",
        "fileCreateTime": "2024-07-12 11:08:50", //The creation time of a file.
        "tenantId": 28***656,
        "fileOwner": "19***735", //The file owner.
        "nodeId": 70***003,
        "projectId": 9***4,
        "fileType": 10,
        "fileId": 50***830,
        "resourceType": 1
      }
    }

    The following table describes the fields:

    Field name

    Field type

    Description

    operator

    String

    The UID of the user who deletes or runs the file.

    projectId

    Long

    The ID of the workspace to which the file belongs.

    tenantId

    Long

    The tenant ID.

    nodeId

    Long

    The ID of the auto triggered node.

    fileType

    Long

    The type of the code in the file. You can call the ListFileType operation to query the code type of the file, or view Supported node types to check the code type of the file.

    fileName

    String

    The name of the file.

    fileOwner

    String

    The owner of the file.

    extensionBizId

    String

    The ID of the check process in an extension.

    fileCreateTime

    String

    The creation time of the file, in the format of yyyy-MM-dd HH:mm:ss.

    fileId

    Long

    The ID of the file.

    eventCode

    String

    The extension event code.

Table change events (commit a table to the development environment and deploy a table to the production environment)

{
  "datacontenttype": "application/json;charset=utf-8",
  "data": {
    "operator": "**************",
    "projectId": 12*****56,
    "tenantId": 12******56,
    "extensionBizId": "12***56",
    "tableName":"table1",
    "tableType":"ODPS",  
    "maxComputeProject":"project1"
  }
}

The following table describes the fields:

Field name

Field type

Description

operator

String

The UID of the user who commits or deploys the table.

projectId

Long

The workspace ID.

tenantId

Long

The tenant ID.

extensionBizId

String

The ID of the check process in an extension.

tableName

String

The name of the table.

tableType

String

The type of the table. The value is ODPS.

maxComputeProject

String

The name of the MaxCompute project.

Data Integration event list

Event list

Event type

Event (and operation that generates the event)

Regular event

Extension point event

EventBridge event type

(Type)

Extension event code (eventCode)

Node change event

Start a real-time task

image

image

dataworks:NodeChange:StartDiJob

start-diJob

Start real-time tasks in batches

image

image

dataworks:NodeChange:BatchStartDiJob

batch-start-diJob

Message format

Node change event-Start a real-time task

The message body format for node change event-start a real-time task (the content of the data field in the event message) is as follows:

## message v1 task start with less than 500 tables
{
    "datacontenttype": "application/json;charset=utf-8",
    "data": {
        "eventCode": "start-diJob",
        "extensionBizId": "0a4***b8ae",
        "extensionBizName": "sync_mysql_to_odps_20240726_192307",
        "appId": 293624,
        "showTableMapping": true,
        "tenantId": 28***656,
        "blockBusiness": true,
        "id": 5280,
        "projectId": 9***4,
        "tableMapping": [
            {
                "srcTable": "xb_test_116",
                "dstDatasourceName": "odps_first",
                "srcDatabaseName": "xiaobo_sharding_79fz",
                "srcDatasourceName": "mysql_3357_pub_ip_1",
                "dstTable": "ods_xb_test_116"
            },
            {
                "srcTable": "xb_test_117",
                "dstDatasourceName": "odps_first",
                "srcDatabaseName": "xiaobo_sharding_79fz",
                "srcDatasourceName": "mysql_3357_pub_ip_1",
                "dstTable": "ods_xb_test_117"
            },
            {
                "srcTable": "xb_test_118",
                "dstDatasourceName": "odps_first",
                "srcDatabaseName": "xiaobo_sharding_79fz",
                "srcDatasourceName": "mysql_3357_pub_ip_1",
                "dstTable": "ods_xb_test_118"
            },
            {
                "srcTable": "xb_test_135",
                "dstDatasourceName": "odps_first",
                "srcDatabaseName": "xiaobo_sharding_79fz",
                "srcDatasourceName": "mysql_3357_pub_ip_1",
                "dstTable": "ods_xb_test_135"
            }
        ],
        "operator": "1504650005316516"
    }
}

## message v2 task start with less than 500 tables
{
    "datacontenttype": "application/json;charset=utf-8",
    "data": {
        "extensionBizId": "59d***50fc",
        "extensionBizName": "sync_mysql_to_holo_20240911_170801",
        "blockBusiness": true,
        "operator": "19***735",
        "setting": {
            "lastStartPosition": "2024-09-11 12:00:00"
        },
        "eventCode": "start-diJob",
        "jobId": 5777,
        "forceRun": false,
        "appId": 293624,
        "showTableMapping": true,
        "tenantId": 28***656,
        "startAsV2": false,
        "tableMapping": [
            {
                "srcTable": "test_verify1",
                "dstDatasourceName": "molin_db",
                "srcDatabaseName": "di_test",
                "srcDatasourceName": "mysql_public",
                "dstTable": "test_verify1"
            },
            {
                "srcTable": "test_verify1_dst",
                "dstDatasourceName": "molin_db",
                "srcDatabaseName": "di_test",
                "srcDatasourceName": "mysql_public",
                "dstTable": "test_verify1_dst"
            },
            {
                "srcTable": "mysql_0_timetest2",
                "dstDatasourceName": "molin_db",
                "srcDatabaseName": "di_test",
                "srcDatasourceName": "mysql_public",
                "dstTable": "mysql_0_timetest2"
            }
        ]
    }
}

##message v2 task start with more than 500 tables, "showTableMapping": false
{
    "datacontenttype": "application/json;charset=utf-8",
    "data": {
        "eventCode": "start-diJob",
        "jobId": 5502,
        "forceRun": false,
        "extensionBizId": "f4c***7cbc",
        "extensionBizName": "sync_mysql_to_holo_20240412_213634",
        "appId": 330914,
        "showTableMapping": false,
        "tenantId": 28***656,
        "blockBusiness": true,
        "startAsV2": false,
        "operator": "19***735",
        "setting": {
            "lastStartPosition": "2024-04-12 22:07:02",
            "startDateTime```
            "lastStartPosition": "2024-04-12 22:07:02",
            "startDateTime": "2024-09-10 17:00:00",
            "timeZone": "Asia/Shanghai"
        }
    }
}

##regular expression
{
    "datacontenttype": "application/json;charset=utf-8",
    "data": {
        "eventCode": "start-diJob",
        "jobId": 5778,
        "forceRun": false,
        "extensionBizId": "a5d***75ba",
        "extensionBizName": "sync_mysql_to_holo_20240912_170517",
        "appId": 293624,
        "showTableMapping": true,
        "tenantId": 28***656,
        "blockBusiness": true,
        "startAsV2": false,
        "tableMapping": [
            {
                "srcTable": "test.*",
                "dstDatasourceName": "molin_db",
                "srcDatabaseName": ".*",
                "srcDatasourceName": "mysql_public",
                "dstTable": "aaa"
            },
            {
                "srcTable": "shard.*",
                "dstDatasourceName": "molin_db",
                "srcDatabaseName": ".*",
                "srcDatasourceName": "mysql_public",
                "dstTable": "vvv"
            }
        ],
        "operator": "19***735"
    }
}

The following table describes the fields:

Field name

Field type

Description

projectId

Long

The DataWorks workspace ID.

operator

String

The UID of the operator.

extensionBizName

String

The name of the solution.

showTableMapping

Boolean

Specifies whether to return table mapping information.

  • true: returns the information.

  • false: does not return the information.

If the number of tables exceeds 500, showTableMapping is set to false by default.

tableMapping

JSONArray

The table mapping relationship.

srcDatasourceName

String

The name of the source data source.

srcDatabaseName

String

The name of the source database.

srcTable

String

The name of the source table.

dstDatasourceName

String

The name of the destination data source.

dstTable

String

The name of the destination table.

tenantId

Long

The tenant ID.

eventCode

String

The extension event code.

Node change event-Start real-time tasks in batches

The message body format for node change event-start real-time tasks in batches (the content of the data field in the event message) is as follows:

{
    "datacontenttype": "application/json;charset=utf-8",
    "data": {
        "needErrorMessage": false,
        "extensionBizId": "2de***c4c6",
        "extensionBizName": "sync_mysql_to_holo_20240911_170801,sync_mysql_to_odps_20240726_192307",
        "errorMessageOnlyFailedFileIds": false,
        "blockBusiness": true,
        "env": "prod",
        "operator": "15***516",
        "setting": {
            "startDateTime": "2024-09-12 14:00:00",
            "timeZone": "Asia/Shanghai"
        },
        "jobIds": [
            5777,
            5679
        ],
        "eventCode": "batch-start-diJob",
        "tableMappings": [
            {
                "extensionBizName": "sync_mysql_to_holo_20240911_170801",
                "id": 5777,
                "tableMapping": [
                    {
                        "srcTable": "test_verify1",
                        "dstDatasourceName": "molin_db",
                        "srcDatabaseName": "di_test",
                        "srcDatasourceName": "mysql_public",
                        "dstTable": "test_verify1"
                    },
                    {
                        "srcTable": "test_verify1_dst",
                        "dstDatasourceName": "molin_db",
                        "srcDatabaseName": "di_test",
                        "srcDatasourceName": "mysql_public",
                        "dstTable": "test_verify1_dst"
                    },
                    {
                        "srcTable": "mysql_0_timetest2",
                        "dstDatasourceName": "molin_db",
                        "srcDatabaseName": "di_test",
                        "srcDatasourceName": "mysql_public",
                        "dstTable": "mysql_0_timetest2"
                    }
                ]
            },
            {
                "extensionBizName": "sync_mysql_to_odps_20240726_192307",
                "id": 5679,
                "tableMapping": [
                    {
                        "srcTable": "xb_test_116",
                        "dstDatasourceName": "odps_first",
                        "srcDatabaseName": "xiaobo_sharding_79fz",
                        "srcDatasourceName": "mysql_3357_pub_ip_1",
                        "dstTable": "ods_xb_test_116"
                    },
                    {
                        "srcTable": "xb_test_117",
                        "dstDatasourceName": "odps_first",
                        "srcDatabaseName": "xiaobo_sharding_79fz",
                        "srcDatasourceName": "mysql_3357_pub_ip_1",
                        "dstTable": "ods_xb_test_117"
                    },
                    {
                        "srcTable": "xb_test_118",
                        "dstDatasourceName": "odps_first",
                        "srcDatabaseName": "xiaobo_sharding_79fz",
                        "srcDatasourceName": "mysql_3357_pub_ip_1",
                        "dstTable": "ods_xb_test_118"
                    },
                    {
                        "srcTable": "xb_test_135",
                        "dstDatasourceName": "odps_first",
                        "srcDatabaseName": "xiaobo_sharding_79fz",
                        "srcDatasourceName": "mysql_3357_pub_ip_1",
                        "dstTable": "ods_xb_test_135"
                    }
                ]
            }
        ],
        "appId": 293624,
        "showTableMapping": true,
        "tenantId": 52***018,
        "projectId": 9***4
    }
}

The following table describes the fields:

Field name

Field type

Description

projectId

Long

The DataWorks workspace ID.

operator

String

The UID of the operator.

extensionBizName

String

The name of the solution.

setting

JSONObject

The startup configuration.

startDateTime

String

The start time.

timeZone

String

The time zone for startup.

tableMapping

JSONArray

The table mapping relationship.

srcDatasourceName

String

The name of the source data source.

srcDatabaseName

String

The name of the source database.

srcTable

String

The name of the source table.

dstDatasourceName

String

The name of the destination data source.

dstTable

String

The name of the destination table.

showTableMapping

Boolean

Specifies whether to return table mapping information.

  • true: returns the information.

  • false: does not return the information.

If the number of tables exceeds 500, showTableMapping is set to false by default.

tenantId

Long

The tenant ID.

eventCode

String

The extension event code.

Operation Center event list

Event list

Event type

Event (and operation that generates the event)

Regular event

Extension point event

EventBridge event type

(Type)

Extension event code (eventCode)

Node change

Delete a node

  • Deploy the delete operation to the production environment to undeploy the node in the production environment

  • Delete a node from the recycle bin

image

image

dataworks:NodeChange:NodeChangeDeleted

node-change-deleted

Undeploy a node

Directly undeploy a node in the production environment

Note

This operation deletes the node in DataStudio and moves the node to the recycle bin.

image

image

dataworks:NodeChange:UndeployNode

undeploy-node

Freeze a node

image

image

dataworks:NodeChange:FreezeNode

freeze-node

Unfreeze a node

image

image

dataworks:NodeChange:UnFreezeNode

unfreeze-node

Data backfilling for nodes

Data backfilling for nodes

image

image

dataworks:BackfillDataOperate:BackfillData

backfill-data

Node status change

Change the status of a scheduling task

image

image

dataworks:InstanceStatusChanges:InstanceStatusChanges

instance-status-changes

Instance change

Freeze an instance

image

image

dataworks:InstanceChange:FreezeInstance

freeze-instance

Unfreeze an instance

image

image

dataworks:InstanceChange:UnfreezeInstance

unfreeze-instance

Terminate an instance

image

image

dataworks:InstanceChange:KillInstance

kill-instance

Rerun an instance

  • Rerun

  • Rerun descendant nodes

image

image

dataworks:InstanceChange:RerunInstance

rerun-instance

Set the status of an instance to Succeeded

image

image

dataworks:InstanceChange:SetInstanceSuccess

set-instance-success

Remove specified upstream dependencies for an instance

image

image

dataworks:InstanceChange:DeleteTaskInstanceDependencies

delete-task-instance-dependencies

Pre-event for freezing an instance

image

image

dataworks:InstanceChange:PreFreezeInstance

pre-freeze-instance

Pre-event for unfreezing an instance

image

image

dataworks:InstanceChange:PreUnfreezeInstance

pre-unfreeze-instance

Pre-event for rerunning an instance

image

image

dataworks:InstanceChange:PreRerunInstance

pre-rerun-instance

Pre-event for setting the status of an instance to Succeeded

image

image

dataworks:InstanceChange:PreSetInstanceSuccess

pre-set-instance-success

Pre-event for terminating an instance

image

image

dataworks:InstanceChange:PreKillInstance

pre-kill-instance

Delete expired instances

image

image

dataworks:InstanceChange:ExpiredTaskInstancesDeleted

expired-task-instances-deleted

Workflow status change

Change the status of a workflow

  • Data backfill instance

  • Manually triggered workflow

image

image

dataworks:DagStatusChanges:DagStatusChanges

dag-status-changes

Monitoring alert

Monitoring alert

image

image

dataworks:MonitorAlert:WorkbenchMonitorAlert

workbench-monitor-alert

Message format

Node change events (delete, undeploy, freeze, and unfreeze)

  • The message body format for node delete events (the content of the data field in the event message) is as follows:

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "nodeName": "",
        "programType": "ODPS_SQL",
        "cronExpress": "00 20 00 * * ?",
        "schedulerType": "NORMAL",
        "ownerId": "19****735",
        "priority": 1,
        "baselineId": 117801853,
        "repeatability": true,
        "modifyTime": 1646364549642,
        "createTime": 1646364549642,
        "datasource": "odps_source",
        "tenantId": 28378****10656,
        "nodeId": 100***150,
        "projectId": 30**95,
        "operator": "19***735"  //The operator.
      }
    }

    The following table describes the fields:

    Field name

    Field type

    Description

    nodeName

    String

    The name of the node.

    programType

    String

    The type of the code for the file. You can call the ListFileType operation to query the code type of the file, or view Supported node types to check the code type of the file.

    cronExpress

    String

    The CRON expression that represents the periodic scheduling policy of the node.

    This parameter corresponds to DataWorks consoleData DevelopmentScheduling Configuration > Time Properties > CRON Expression in the task in the .

    After you configure Scheduling Cycle and Scheduled Time, DataWorks automatically generates the corresponding CRON expression. Examples:

    • Run the node at 05:30 every day: 00 30 05 * * ?

    • Run the node at the 15th minute of each hour: 00 15 * * * ?

    • Run the node every 10 minutes: 00 00/10 * * * ?

    • Run the node every 10 minutes from 8:00 to 17:00 every day: 00 00-59/10 8-17 * * * ?

    • Run the node at 00:20 on the first day of each month: 00 20 00 1 * ?

    • Run the node at 00:10 on January 1 and once every three months: 00 10 00 1 1-12/3 ?

    • Run the node at 00:05 every Tuesday and Friday: 00 05 00 * * 2,5

    Note

    Limits on CRON expressions:

    • A node can be scheduled to run at a minimum interval of 5 minutes.

    • A node can be scheduled to run at 00:05 every day at the earliest.

    schedulerType

    String

    The scheduling type of the node. Valid values:

    • 0: NORMAL, which indicates a normal scheduling task. The scheduling system regularly runs the node.

    • 1: MANUAL, which indicates a one-time task. The scheduling system does not regularly run the node.

    • 2: PAUSE, which indicates a frozen task. The scheduling system regularly runs the node but sets the status of the node to Failed when the scheduling system starts to run the node.

    • 3: SKIP, which indicates a dry-run task. The scheduling system regularly runs the node but sets the status of the node to Succeeded when the scheduling system starts to run the node.

    • 4: SKIP_UNCHOOSE, which indicates a task that is not selected in a temporary workflow. This type of task exists only in a temporary workflow. The status of the task is directly set to Succeeded when the scheduling system starts to run the task.

    • 5: SKIP_CYCLE, which indicates a weekly or monthly task whose scheduling cycle does not arrive. The scheduling system regularly runs the node but sets the status of the node to Succeeded when the scheduling system starts to run the node.

    • 6: CONDITION_UNCHOOSE, which indicates that the ancestor node is a branch node, but the current node is not selected by the branch node. The status of the node is directly set to Succeeded.

    • 7: REALTIME_DEPRECATED, which indicates an expired auto triggered node instance that is generated in real time. The status of this type of task is directly set to Succeeded.

    ownerId

    String

    The ID of the Alibaba Cloud account used by the owner of the node. If this parameter is not configured, the ID of the Alibaba Cloud account of the user who schedules the node is used.

    priority

    Integer

    The priority of the task. Valid values: 1, 3, 5, 7, and 8. A larger value indicates a higher priority.

    baselineId

    Long

    The ID of the baseline.

    repeatability

    Boolean

    Specifies whether the node can be rerun. Valid values:

    • true: The node can be rerun.

    • false: The node cannot be rerun.

    modifyTime

    Long

    The last time when the node was modified.

    createTime

    Long

    The time when the node was created.

    nodeId

    Long

    The ID of the node.

    projectId

    Long

    The ID of the workspace to which the node belongs.

    tenantId

    Long

    The ID of the tenant to which the node belongs.

    operator

    String

    The UID of the user who adds, modifies, or deletes the node.

  • The message body format for node freeze, unfreeze, and undeploy events (the content of the data field in the event message) is as follows:

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "operator": "19***735",
        "projectId": 12***56,
        "tenantId": 28***656,
        "nodeIds":[1,2,3],
        "extensionBizId": "12***56"
      }
    }

    The following table describes the fields:

    Field name

    Field type

    Description

    operator

    String

    The UID of the user who freezes, unfreezes, or undeploys the node.

    projectId

    Long

    The ID of the workspace to which the node belongs.

    tenantId

    Long

    The tenant ID.

    nodeIds

    Array

    The IDs of the nodes on which you performed the operation.

    extensionBizId

    String

    The ID of the check process in an extension.

Data backfilling for nodes

The message body format for data backfill operations (the content of the data field in the event message) is as follows:

{
  "datacontenttype": "application/json;charset=utf-8",
  "data": {
    "excludeNodeIds":[],
    "rootNodeId": 1000****271,
    "startFutureInstanceImmediately": false,
    "useMultipleTimePeriods": true,
    "operator": "19***735",
    "eventCode": "backfill-data",
    "multipleTimePeriods": "[{\"bizBeginTime\":\"2022-04-17\",\"bizEndTime\":\"2022-04-17\"}]",
    "parallelGroup": 1,
    "rootNodeProjectId": 12*****8,
    "isParallel": false,
    "name": "P_fff_20220418_215404",
    "tenantId": 16935*****3377,
    "includeNodeIds":
    [
      10***271
    ],
    "projectId": 9***4,
    "order": "asc",
    "extensionBizId": "12***56"
  }
}

The following table describes the fields:

Field name

Field type

Description

name

String

The name of the workflow that contains the node for which you backfill data.

rootNodeId

Long

The ID of the root node in the workflow that contains the node for which you backfill data.

rootNodeProjectId

Long

The ID of the workspace to which the root node belongs. The root node is in the workflow that contains the node for which you backfill data.

includeNodeIds

Array

The IDs of the nodes for which you backfill data.

excludeNodeIds

Array

The IDs of the nodes for which no data needs to be backfilled. The system generates dry-run instances for these nodes. After the dry-run instances are scheduled, the statuses of the instances are directly set to Succeeded but the script is not executed.

bizBeginTime

String

The start time of the task. This parameter is required only for hourly scheduled tasks. The format is HH:mm:ss, with a value range from 00:00:00 to 23:59:59.

bizEndTime

String

The end time of the task. This parameter is required only for hourly scheduled tasks. The format is HH:mm:ss, and the value range is 00:00:00 to 23:59:59.

isParallel

Boolean

Specifies whether data backfill operations can run in parallel:

  • true: Data backfill operations can run in parallel.

  • false: Data backfill operations cannot run in parallel.

parallelGroup

Integer

The number of groups that are run in parallel. The value 1 indicates that no grouping is performed.

startFutureInstanceImmediately

Boolean

Specifies whether to immediately run node instances that are scheduled to run at future points in time:

  • true: Skips the scheduled time and immediately executes future instances.

  • false: Does not skip the scheduled time and does not immediately execute future instances.

order

String

The node execution sequence based on data timestamps:

  • acs: Indicates that nodes are executed in ascending order of data timestamps.

  • desc: Indicates that nodes are executed in descending order of data timestamps.

multipleTimePeriods

String

Multiple data timestamp time periods. Example: [{\"bizBeginTime\":\"2022-04-17\",\"bizEndTime\":\"2022-04-17\"}].

tenantId

Long

The tenant ID.

projectId

Long

The ID of the project in which the data backfill operation is performed.

operator

String

User D who executes the data backfill operation.

extensionBizId

String

The ID of the check process in an extension.

eventCode

String

The event code of the extension program.

Node status change

The following example shows the message entity format of a scheduling task status change event (the content of the data field in the event message).

{
  "datacontenttype": "application/json;charset=utf-8",
  "data": {
    "beginWaitTimeTime": 1652700576000,
    "dagId": 446***330,
    "dagType": 0,
    "eventCode": "instance-status-changes",
    "taskType": 0,
    "modifyTime": 1652700577000,
    "createTime": 1652543233000,
    "appId": 3*****2,
    "tenantId": 235454***432001,
    "opCode": 31,
    "flowId": 1,
    "nodeId": 100***219,
    "beginWaitResTime": 1652700577000,
    "taskId": 453***169,
    "status": 3
  }
}

The following table describes the fields:

Field name

Field type

Description

finishTime

Long

The time when the auto triggered node instance finished running.

beginWaitTimeTime

Long

The time when the auto triggered node instance started to wait for the scheduling time.

beginRunningTime

Long

The time when the auto triggered node instance started to run.

dagId

Long

You can obtain the DAG details based on DagId.

dagType

Integer

The type of the DAG. Valid values:

  • 0: auto triggered node

  • 1: one-time task

  • 2: smoke testing

  • 3: data backfill

  • 4: temporary workflow

  • 5: manually triggered workflow

taskType

Integer

The scheduling type of the node. Valid values:

  • 0: NORMAL, normal scheduled task. The scheduling system regularly runs the node.

  • 1: MANUAL, manual task. The scheduling system does not regularly run the node.

  • 2: PAUSE, frozen task. The scheduling system regularly runs the node but sets the node status to Failed when the scheduling system starts to run the node.

  • 3: SKIP, dry-run task. The scheduling system regularly runs the node but sets the node status to Succeeded when the scheduling system starts to run the node.

  • 4: SKIP_UNCHOOSE, unselected task in a temporary workflow. This task exists only in a temporary workflow and is set to Succeeded when the scheduling system starts to run the node.

  • 5: SKIP_CYCLE, weekly or monthly task that has not reached its scheduling cycle. The scheduling system regularly runs the node but sets the node status to Succeeded when the scheduling system starts to run the node.

  • 6: CONDITION_UNCHOOSE, a descendant node that is not selected by a branch (IF) node in the upstream instance. This node is directly set as a dry-run task.

  • 7: REALTIME_DEPRECATED, an expired recurring instance that is generated in real time. This type of task is directly set to Succeeded.

modifyTime

Long

The last time when the node instance was modified.

createTime

Long

The time when the node instance was created.

appId

Long

The ID of the workspace. You can call ListProjects to view the workspace ID information.

tenantId

Long

The ID of the tenant of the workspace to which the auto triggered node instance belongs.

opCode

Integer

The operation code of the auto triggered node instance. You can ignore the field value.

flowId

Long

The ID of the workflow.

  • For an auto triggered node instance, the field value is 1.

  • For a manually triggered workflow or an auto triggered node instance of the internal workflow type, the field value is the actual workflow ID.

nodeId

Long

The ID of the node for which the auto triggered node instance was generated.

beginWaitResTime

Long

The time when the auto triggered node instance started to wait for resources.

taskId

Long

The ID of the auto triggered node instance.

status

Integer

The status of the node. Valid values:

  • 1: Not running.

  • 2: Waiting for the scheduled time dueTime or cycleTime.

  • 3: Waiting for resources.

  • 4: Running.

  • 7: Submitted to Data Quality for data validation.

  • 8: Checking branch conditions.

  • 5: Failed.

  • 6: Succeeded.

eventCode

String

The event code of the extension point event.

Instance change events (freeze, unfreeze, terminate, rerun, set to succeeded)

The following example shows the message entity format for instance operation events (the content of the data field in the event message).

{
  "datacontenttype": "application/json;charset=utf-8",
  "data": {
    "eventCode": "freeze-instance",
    "operator": "19***735",
    "projectId": 12***8,
    "projectType": "PROD",
    "taskIds": [
      523***9736
    ],
    "tenantId": 28***656
  }
}

The following table describes the parameters.

Parameter

Type

Description

operator

String

The UID of the user who performs the operations such as freezing, unfreezing, terminating, or rerunning an instance, or setting the status of an instance to Succeeded.

projectType

String

The runtime environment.

  • PROD: production environment.

  • DEV: development environment.

taskIds

List<Long>

The IDs of the instances.

projectId

Long

The ID of the DataWorks workspace.

tenantId

Long

The ID of the tenant of the workspace to which the instance belongs.

eventCode

String

The code of the event.

Instance change events (pre-freeze instance, pre-unfreeze instance, pre-rerun instance, pre-set instance to succeeded, pre-kill instance events)

The following example shows the message entity format for instance operation pre-events (the content of the data field in the event message).

{
  "datacontenttype": "application/json;charset=utf-8",
  "data": {
    "eventCode": "pre-freeze-instance",
    "extensionBizId": "055***afaa",
    "extensionBizName": "Node name",
    "projectId": 9***4,
    "taskIds": [
      523536569736
    ],
    "tenantId": 28***656,
    "operator": "19***735"
  }
}

The following table describes the parameters.

Parameter

Type

Description

extensionBizId

String

The ID of the check process in an extension.

extensionBizName

String

The name of the operation object. If multiple objects exist, the description is in the format of "Object name...".

projectId

Long

The ID of the DataWorks workspace.

taskIds

List<Long>

The IDs of the instances.

tenantId

String

The ID of the tenant of the workspace to which the instance belongs.

operator

Long

The UID of the Alibaba Cloud account that performs the operation on the instance.

eventCode

String

The code of the extension point event.

Instance change events (freeze, unfreeze, terminate, rerun, set to Succeeded, and remove upstream dependencies)

The format of the message entity for deleting expired instance events (the content of the data field in the event message) is shown in the following example.

{
    "datacontenttype": "application/json;charset=utf-8",
    "data": {
        "eventCode": "expired-task-instances-deleted",
        "deletedTaskInstanceIds": [
            524***035,
            524***498,
            524***637
        ],
        "appId": 307303,
        "tenantId": 28***656,
        "blockBusiness": false,
        "owner": "1107***538",
        "operationTime": 1734505954897
    }
}

The field descriptions are as follows:

Field name

Field type

Description

deletedTaskInstanceIds

List

The list of deleted instance IDs.

owner

String

The user ID of the instance owner.

operationTime

Long

The time when the operation was performed.

blockBusiness

Boolean

Specifies whether to stop the flow when an extension program exists.

  • true: The flow is stopped.

  • false: The flow is not stopped.

appId

Long

The DataWorks workspace ID.

tenantId

String

The ID of the tenant of the workspace to which the instance belongs.

operator

Long

The UID of the Alibaba Cloud account that performs operations on the instance.

eventCode

String

The code of the extension point event.

Remove specified upstream dependency events for an instance

The following example shows the message entity format for removing specified upstream dependencies of an instance (the content of the data field in the event message):

{
    "datacontenttype": "application/json;charset=utf-8",
    "aliyunaccountid": "110******38",
    "aliyunpublishtime": "2024-12-18T07:12:35.463Z",
    "data": {
        "eventCode": "delete-task-instance-dependencies",
        "upstreamTaskInstanceIds": [
            52******35,
            52******98,
            52******37
        ],
        "appId": 3***03,
        "tenantId": 52******36,
        "blockBusiness": false,
        "taskInstanceId": 52******49,
        "operator": "19***735",
        "operationTime": 1734505954897
    }
}

The following table describes the fields:

Field name

Field type

Description

taskInstanceId

Long

The downstream instance ID.

upstreamTaskInstanceIds

List

The list of upstream instance IDs for which dependencies are removed.

operator

String

The UID of the user who performed the operation.

operationTime

Long

The operation time.

Workflow status change

The following example shows the message entity format of a workflow status change event (the content of the data field in the event message).

{
  "datacontenttype": "application/json;charset=utf-8",
  "data": {
    "bizDate": "2022-11-07 00:00:00",
    "createTime": "2022-11-08 10:56:32",
    "dagId": 500358972116,
    "dagName": "P_test_spark_true_copy_20221108_105631",
    "eventCode": "dag-status-changes",
    "dagType": 3,
    "flowId": 1,
    "flowName": "ATCLOUD_FLOW",
    "operator": "11****538",
    "projectEnv": "PROD",
    "projectId": 25***63,
    "status": 6,
    "tenantId": 52***736
  }
}

The following table describes the fields:

Field name

Field type

Description

bizDate

String

The data timestamp of the workflow. The format is yyyy-mm-dd hh24:mi:ss.

createTime

String

The time when the workflow was created. The format is yyyy-mm-dd hh24:mi:ss.

dagId

Long

The ID of the DAG. You can query the details of the DAG based on the dagId field.

dagName

String

The name of the workflow.

dagType

Integer

The type of the DAG. Valid values:

  • 0: recurring schedule task.

  • 1: one-time task.

  • 2: smoke testing.

  • 3: data backfill.

  • 4: temporary workflow.

  • 5: manually triggered workflow.

flowId

Integer

The ID of the workflow.

flowName

String

The name of the workflow.

operator

String

The UID of the user who created the workflow.

projectEnv

String

The environment to which the workflow belongs. Valid values:

  • DEV: development environment.

  • PROD: production environment.

tenantId

Long

The ID of the tenant that manages the workspace to which the auto triggered node instance belongs.

projectId

Long

The DataWorks workspace ID.

status

Integer

The status of the node in the workflow. Valid values:

  • 1: not running.

  • 4: running.

  • 5: failed.

  • 6: successful.

eventCode

String

The event code of the extension point event.

Monitoring and alerts

  • The message entity format for baseline alerts (the content of the data field in the message) is shown in the following example.

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "eventCode": "workbench-monitor-alert",
        "alarmType": "SLA_ALERT",
        "baselineId": 137***723,
        "baselineName": "Dedicated to the check for hour-level nodes at the ODS layer",
        "baselineStatus": 3,
        "bizDate": 1654444800000,
        "inGroupId": 14,
        "nodeId": 1000***8734,
        "projectId": 76***34,
        "taskId": 307***3778,
        "tenantId": 28***656
      }
    }

    The following table describes the fields in the preceding sample code.

    Field name

    Field type

    Description

    alarmType

    String

    The type of the alert. Valid values:

    • SLA_ALERT

    • REMIND_ALERT

    • TOPIC_ALERT

    baselineId

    Long

    The ID of the baseline.

    baselineName

    String

    The name of the baseline.

    baselineStatus

    Integer

    The status of the baseline. Valid values:

    • -1: abnormal.

    • 1: safe.

    • 2: warning.

    • 3: broken.

    bizDate

    Long

    The data timestamp.

    inGroupId

    Integer

    The ID of the scheduling cycle of the baseline instance. The value for a daily baseline is 1. The value range for an hourly baseline is [1,24].

    nodeId

    Long

    The ID of the node that triggers an exception on the baseline to which the node belongs.

    projectId

    Long

    The ID of the workspace to which the baseline belongs.

    taskId

    Long

    The ID of the instance that triggers an exception on the baseline to which the instance belongs.

    tenantId

    Long

    The tenant ID.

    eventCode

    String

    The event code of the extension point event.

  • The message entity format for event alerts (the content of the data field in the message) is shown in the following example.

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "alarmType": "TOPIC_ALERT",
        "nodeId": 1000***315,
        "projectId": 91***09,
        "taskId": 307***0357,
        "taskStatus": 5,
        "tenantId": 28***656,
        "topicId": 1084769
      }
    }

    The following table describes the fields in the preceding sample code.

    Field name

    Field type

    Description

    alarmType

    String

    The type of the alert. Valid values:

    • SLA_ALERT

    • REMIND_ALERT

    • TOPIC_ALERT

    topicId

    Long

    The event ID.

    taskStatus

    String

    The status of the instance that is generated for the node in which the event occurred.

    nodeId

    Integer

    The ID of the node in which the event occurred.

    projectId

    Long

    The ID of the workspace to which the node in which the event occurred belongs.

    taskId

    Long

    The ID of the instance that is generated for the node in which the event occurred.

    tenantId

    Long

    The tenant ID.

  • The message entity format for task rule alerts (the content of the data field in the message) is shown in the following example.

    Note

    In most cases, the objects for which you can configure a rule include node, baseline, workspace, and workflow.

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "alarmType": "REMIND_ALERT",
        "nodeIds": "1000***5472,1000***5473,1000***5474",
        "projectId": 9***4,
        "remindId": 7605,
        "remindName": "Error alert",
        "remindType": "ERROR",
        "remindUnit": "NODE",
        "taskIds": "307***0896,307***0870,307***0855",
        "tenantId": 28***656
      }
    }

    The following table describes the fields in the preceding sample code.

    Field name

    Field type

    Description

    alarmType

    String

    The type of the alert. Valid values:

    • SLA_ALERT

    • REMIND_ALERT

    • TOPIC_ALERT

    nodeIds

    String

    The IDs of the nodes for which the rule-based alert is triggered.

    remindId

    Long

    The ID of the rule.

    remindType

    Stirng

    The trigger condition of the rule. Valid values:

    • FINISHED: completed.

    • UNFINISHED: not completed.

    • ERROR: error occurred during running.

    • CYCLE_UNFINISHED: cycle not completed.

    • TIMEOUT: timeout during running.

    projectId

    Long

    The ID of the workspace. The workspace contains the node for which the rule-based alert is triggered.

    remindUnit

    String

    The type of the object for which the rule-based alert is triggered. Valid values:

    • NODE: task node.

    • GATEWAY_RES: exclusive resource group for scheduling.

    • DI_RES: Data Integration resource group.

    tenantId

    Long

    The tenant ID.

    taskId

    String

    The IDs of the instances for which the rule-based alert is triggered.

    remindName

    String

    The name of the rule.

  • The message entity format for resource group rule alerts (the content of the data field in the message) is shown in the following example.

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "alarmType": "REMIND_ALERT",
        "projectId": 9***4,
        "remindId": 200***186,
        "remindName": "Alert for an exclusive resource group",
        "remindType": "RES_GROUP_THRESHOLD",
        "remindUnit": "GATEWAY_RES",
        "resourceGroupIdentifier": "S_res_group_195820716552192_1650965857744",
        "resourceGroupName": "emr_exclusive_scheduld",
        "resourceGroupType": "GATEWAY",
        "tenantId": 28***656
      }
    }

    The following table describes the fields in the preceding sample code.

    Field name

    Field type

    Description

    alarmType

    String

    The type of the alert. Valid values:

    • SLA_ALERT

    • REMIND_ALERT

    • TOPIC_ALERT

    remindId

    Long

    The ID of the rule.

    remindType

    Stirng

    The trigger condition of the rule. Valid values:

    • FINISHED: completed.

    • UNFINISHED: not completed.

    • ERROR: error occurred during running.

    • CYCLE_UNFINISHED: cycle not completed.

    • TIMEOUT: timeout during running.

    • RES_GROUP_THRESHOL: resource group utilization.

    • RES_GROUP_WAIT_AMOUNT: number of instances waiting for resources in the resource group.

    projectId

    Long

    The ID of the workspace. The workspace contains the node for which the rule-based alert is triggered.

    remindUnit

    String

    The type of the object for which the rule-based alert is triggered. Valid values:

    • NODE: task node.

    • GATEWAY_RES: exclusive resource group for scheduling.

    • DI_RES: Data Integration resource group.

    tenantId

    Long

    The tenant ID.

    remindName

    String

    The name of the rule.

    resourceGroupIdentifier

    String

    The ID of the resource group.

    resourceGroupName

    String

    The name of the resource group.

    resourceGroupType

    String

    The type of the resource group. Valid values:

    • GATEWAY: schedule resource.

    • DI: Data Integration resource group.

Data Quality event list

Event list

Event type

Events (and operations that generate events)

Normal event

Extension point events

EventBridge event type

(Type)

Extension program message type (eventCode)

Approval center

Pre-event for creating permission request

image

image

dataworks:ApprovalChange:ApprovalChangeCreated

approval-change-created

Complete request order

image

image

dataworks:ApprovalChange:ApprovalChangeFinished

approval-change-finished

Security Center (table permission request)

Table permission request pre-event

image

image

dataworks:ApprovalChange:ApprovalChangeBeforeCreate

approval-change-before-create

Message format

Approval center (Create and complete request orders)

  • The following example shows the message entity format for the pre-event of creating a permission request order (the content of the data field in the event message).

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "appId":194209,
        "assignee":"286098539641742899",
        "assigneeName":"yupeng.sunyp",
        "createTime":1652094363000,
        "eventType":"approval",
        "process":{
          "applicant":"286098539641742899",
          "applicantName":"yupeng.sunyp",
          "approvalContent":{
            "applyPeriod":"2997964800000",
            "applyReason":"test",
            "arrayData":[
              {
                "ownerBaseId":"1822***45",
                "objectType":"TABLE",
                "odpsTable":"loghub_070103",
                "envType":1,
                "projectGuid":"odps.b_mc1",
                "objectGuid":"odps.b_mc1.loghub_070103",
                "tenantId":28***656,
                "objectName":"loghub_070103",
                "ownerAccountName":"ALIYUN$******(******)",
                "odpsProject":"B_MC1",
                "projectName":"B_MC1",
                "actions":[
                  "Select",
                  "Describe"
                ],
                "projectId":9***4,
                "workspaceId":"9***4"
              }
            ],
            "contentType":"application/json",
            "granteeAccounts":[
              {
                "granteeId":"2860985***99",
                "granteeTypeSub":103,
                "granteeType":1,
                "granteeName":"RAM$dataworks_3h1_1:yupeng.sunyp"
              },
              {
                "granteeId":"237857631119109360",
                "granteeTypeSub":105,
                "granteeType":1,
                "granteeName":"RAM$dataworks_3h1_1:dev"
              }
            ],
            "odpsProjectName":"B_MC1",
            "projectEnv":"1",
            "resourceSummary":"loghub_070103",
            "tenantId":28***656,
            "workspaceId":194209
          },
          "assignmentCategory":"MaxCompute",
          "createTime":1652094363000,
          "processDefinitionId":"definition-3dcc9ce7-d29d-435d-a908-60d4355ff5e2",
          "processId":"528535869984706",
          "status":"Pending",
          "title":"MaxComputeTable",
          "updateTime":1652094363000
        },
        "processId":"528535869984706",
        "status":"Submit",
        "eventCode": "approval-change-created",
        "taskId":"528535870015424",
        "tenantId":28***656,
        "updateTime":1652094364000
      }
    }{
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "appId":227859,
        "assignee":"286098539641742899",
        "eventCode": "approval-change-finished",
        "assigneeName":"******.******",
        "comments":"ces",
        "createTime":1652095981000,
        "eventType":"approval",
        "process":{
            "applicant":"286098***2899",
            "applicantName":"yupeng.sunyp",
            "approvalContent":{
                "applyPeriod":"2997964800000",
                "applyReason":"test",
                "arrayData":[
                    {
                        "ownerBaseId":"2382***884", 
                        "objectType":"TABLE",
                        "odpsTable":"cdd",
                        "objectNameCn":"******",
                        "envType":1,
                        "projectGuid":"odps.da_simple_202112",
                        "objectGuid":"odps.da_simple_202112.cdd",
                        "tenantId":0,
                        "objectName":"cdd",
                        "ownerAccountName":"RAM$******(******)",
                        "odpsProject":"da_simple_202112",
                        "projectName":"da_simple_202112",
                        "actions":[
                            "Select",
                            "Describe"
                        ],
                        "projectId":9***4,
                        "workspaceId":"9***4"
                    }
                ],
                "contentType":"application/json",
                "granteeAccounts":[
                    {
                        "granteeId":"286***899",
                        "granteeTypeSub":103,
                        "granteeType":1,
                        "granteeName":"RAM$dataworks_3h1_1:yupeng.sunyp"
                    }
                ],
                "odpsProjectName":"da_simple_202112",
                "projectEnv":"1",
                "resourceSummary":"cdd",
                "tenantId":28***656,
                "workspaceId":227859
            },
            "assignmentCategory":"MaxCompute",
            "createTime":1652095981000,
            "processDefinitionId":"definition-6e6418e6-c65f-4f26-a673-88576b1c1e4a",
            "processId":"528***192",
            "status":"Pending",
            "title":"MaxComputeTable",
            "updateTime":1652095981000
        }

    The following table describes the parameters.

    Parameter

    Type

    Description

    appId

    Long

    The workspace ID.

    assignee

    String

    The base ID of the Alibaba Cloud account used by the request approver.

    assigneeName

    String

    The name of the Alibaba Cloud account used by the request approver.

    comments

    String

    The remarks.

    createTime

    Long

    The timestamp when the request processing order is created.

    processId

    String

    The ID of the request processing order.

    status

    String

    The status of the request processing order.

    taskId

    String

    The ID of the request processing task.

    tenantId

    String

    The tenant ID.

    updateTime

    String

    The timestamp when the request processing order is updated.

    eventType

    String

    The event type.

    process

    Object

    The process for the request task.

    applicant

    String

    The base ID of the applicant.

    applicantName

    String

    The name of the applicant.

    assignmentCategory

    String

    The type of the content on which you request permissions.

    createTime

    String

    The timestamp when the request processing order is created.

    processDefinitionId

    String

    The unique ID of the defined approval workflow.

    processId

    String

    The ID of the workflow.

    status

    String

    The status of the workflow.

    title

    String

    The title of the workflow.

    updateTime

    Long

    The timestamp when the request processing order is updated.

    approvalContent

    Object

    The content of the request order.

    applyPeriod

    String

    The validity period of the requested permissions.

    applyReason

    String

    The reason for the request.

    contentType

    String

    The data type of the content.

    odpsProjectName

    String

    The name of the MaxCompute project.

    resourceSummary

    String

    The resource description.

    tenantId

    Long

    The tenant ID.

    workspaceId

    Long

    The workspace ID.

    projectEnv

    String

    The environment of the MaxCompute project.

    granteeAccounts

    Array

    The accounts of the requesters.

    .granteeId

    String

    The ID of the requester.

    granteeType

    String

    The type of authorization.

    granteeTypeSub

    String

    The account type of the requester.

    granteeName

    String

    The name of the requester.

    arrayData

    Array

    The list of authorization content. For more information, see Development reference: Event lists and event message formats.

    eventType

    String

    The event type.

  • The following example shows the message entity format for the event of completing a request order (the content of the data field in the event message).

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "appId": 227859,
        "assignee": "286098539641742899",
        "eventCode": "approval-change-finished",
        "assigneeName": "******.******",
        "comments": "ces",
        "createTime": 1652095981000,
        "eventType": "approval",
        "process": {
          "applicant": "2860****899",
          "applicantName": "yupeng.sunyp",
          "approvalContent": {
            "applyPeriod": "2997***0000",
            "applyReason": "test",
            "arrayData": [
              {
                "ownerBaseId": "2382***8*884",
                "objectType": "TABLE",
                "odpsTable": "cdd",
                "objectNameCn": "******",
                "envType": 1,
                "projectGuid": "odps.da_simple_202112",
                "objectGuid": "odps.da_simple_202112.cdd",
                "tenantId": 0,
                "objectName": "cdd",
                "ownerAccountName": "RAM$******(******)",
                "odpsProject": "da_simple_202112",
                "projectName": "da_simple_202112",
                "actions": [
                  "Select",
                  "Describe"
                ],
                "projectId": 9***4,
                "workspaceId": "9***4"
              }
            ],
            "contentType": "application/json",
            "granteeAccounts": [
              {
                "granteeId": "286***899",
                "granteeTypeSub": 103,
                "granteeType": 1,
                "granteeName": "RAM$dataworks_3h1_1:yupeng.sunyp"
              }
            ],
            "odpsProjectName": "da_simple_202112",
            "projectEnv": "1",
            "resourceSummary": "cdd",
            "tenantId": 28***656,
            "workspaceId": 227859
          },
          "assignmentCategory": "MaxCompute",
          "createTime": 1652095981000,
          "processDefinitionId": "definition-6e6418e6-c65f-4f26-a673-88576b1c1e4a",
          "processId": "528***192",
          "status": "Pending",
          "title": "MaxComputeTable",
          "updateTime": 1652095981000
        }
      }
    }

    The following table describes the parameters.

    Parameter

    Type

    Description

    appId

    Long

    The workspace ID.

    assignee

    String

    The base ID of the Alibaba Cloud account used by the request approver.

    assigneeName

    String

    The name of the Alibaba Cloud account used by the request approver.

    comments

    String

    The remarks.

    createTime

    Long

    The timestamp when the request processing order is created.

    processId

    String

    The ID of the request processing order.

    status

    String

    The status of the request processing order.

    taskId。

    String

    The ID of the request task.

    tenantId

    String

    The tenant ID.

    updateTime

    String

    The timestamp when the request processing order is last updated.

    eventType

    String

    The event type.

    process

    Object

    The process for the request task.

    applicant

    String

    The base ID of the applicant.

    applicantName

    String

    The name of the applicant.

    assignmentCategory

    String

    The type of the content on which you request permissions.

    createTime

    String

    The timestamp when the request processing order is created.

    processDefinitionId

    String

    The unique ID of the defined approval workflow.

    processId

    String

    The ID of the workflow.

    status

    String

    The status of the workflow.

    title

    String

    The title of the workflow.

    updateTime

    Long

    The timestamp when the request processing order is updated.

    approvalContent

    Object

    The content of the request order.

    applyPeriod

    String

    The validity period of the requested permissions.

    applyReason

    String

    The reason for the request.

    contentType

    String

    The type of the response body.

    odpsProjectName

    String

    The name of the project.

    resourceSummary

    String

    The resource description.

    tenantId

    Long

    The tenant ID.

    workspaceId

    Long

    The workspace ID.

    projectEnv

    String

    The environment of the MaxCompute project.

    granteeAccounts

    Array

    The accounts of the requesters.

    granteeId

    String

    The ID of the requester.

    granteeType

    String

    The type of the authorization.

    granteeTypeSub

    String

    The account type of the requester. Valid values:

    • ACCOUNT_PRD(101): The account that is used for node scheduling in the production environment.

    • ACCOUNT_APP(102): The account for an application.

    • ACCOUNT_USER(103): The account for a user.

    • ACCOUNT_DEPT(104): The account for a department.

    • ACCOUNT_MOCK(106): The account for MOCK.

    • ACCOUNT_OTHER_USER(105): The account for another user.

    granteeName

    String

    The name of the requester.

    arrayData

    Array

    The list of authorization content. For more information, see Development reference: Event lists and event message formats.

    eventType

    String

    The event type.

Security Center (Table permission request pre-event)

The message entity format of the pre-event for table permission requests (the content of the data field in the event message) is shown in the following example:

{
  "datacontenttype": "application/json;charset=utf-8",
  "data": {
    "eventType": "approval-create-before",
    "operator":"19***735",
    "order":{
      "applyReason":"test",
      "deadlineDate":"1",
      "deadlineType":"month",
      "granteeObjectList":[
        {
          "granteeId":"1239****8872"
        }
      ],
      "projectMeta":{
        "envCode":1,
        "labelSecurity":false,
        "objectMetaList":[
          {
            "action":[
              "Select",
              "Describe"
            ],
            "name":"tablei",
            "projectGuid":"odps.d11aa"
          }
        ],
        "projectId":2****0,
        "projectName":"d11aa"
      }
    },
    "projectId":2****0,
    "tenantId":5564****6465
  }
}

The following table describes the fields:

Field name

Field type

Description

operator

String

The UID of the user who performs the pre-event operation for table permission request.

projectId

Long

The ID of the workspace in which a pre-event for table permission request is performed.

tenantId

Long

The ID of the tenant within which a pre-event for table permission request is performed.

order

Object

The information about the request order.

applyReason

String

The reason for the request.

deadlineDate

String

The validity period of the request order.

deadlineType

String

The unit of the validity period of the request order. Valid values: Day and Month.

granteeObjectList

Object

The list of authorized objects.

granteeId

String

The ID of the authorized object, which is the ID of a RAM user.

projectMeta

Object

The information about the workspace.

envCode

Integer

The code of the workspace environment. The value 0 indicates the development environment. The value 1 indicates the production environment.

labelSecurity

Boolean

Specifies whether to enable label-level control. Valid values:

  • true: enables the control.

  • false: does not enable the control.

objectMetaList

Array

The list of authorized objects.

action

Array

The authorized operation. For example, the authorized object is granted the SELECT or DESCRIBE permission.

name

String

The name of the table on which you want to request for permissions.

projectGuid

String

The GUID of the workspace to which the table belongs.

projectName

String

The name of the workspace to which the table belongs.

eventType

String

The event type.

Appendix: Authorization content list (MaxCompute)

In DataWorks Security Center events, when approval and table permission requests are triggered, the event messages sent to EventBridge include arrayData data. When the assignmentCategory type is MaxCompute, the content of arrayData is as follows:

{
    "ownerBaseId":"1822931104031845",
    "objectType":"TABLE",
    "odpsTable":"oracle_************",
    "envType":1,
    "projectGuid":"odps.***********",
    "objectGuid":"odps.******.******",
    "tenantId":0,
    "objectName":"oracle_******",
    "ownerAccountName":"ALIYUN***************",
    "odpsProject":"dataworks******",
    "projectName":"dataworks******",
    "actions":[
      "Select",
      "Describe"
    ],
    "projectId":9***4,
    "workspaceId":"9***4"
  }

Field descriptions:

Field name

Field type

Description

ownerBaseId

String

The base ID of the table owner.

ownerAccountName

String

The name of the table owner.

objectType

String

The type of the asset that is detected.

odpsTable

String

The table name.

envType

String

The environment in which the table is used.

projectGuid

String

The GUID of the MaxCompute project.

objectGuid

String

The GUID of the object.

objectName

String

The name of the object.

odpsProject

String

The name of the MaxCompute project.

projectName

String

The code of the MaxCompute project.

projectId

Long

The ID of the MaxCompute project.

workspaceId

String

The workspace ID.

actions

Array

The actions.

Appendix: Authorization content list (DataService)

In DataWorks Security Center events, when triggering approvals and table permission requests, arrayData is added to the messages sent to EventBridge. When the assignmentCategory type is DataService, the content of arrayData is as follows:

{
    "resourceId":"DsApiDeploy/******/workspaceId/******/dsDeployId/******",
    "ownerName":"******",
    "resourceVersion":1,
    "name":"api_api",
    "dsDeployId":"******",
    "workspaceName":"da_******",
    "id":"******",
    "type":1,
    "ownerId":"19****735",
    "url":"https://******.data.aliyun.com/?projectId=******&type=api&id=******&version=***&defaultProjectId=******",
    "workspaceId":"******"
  }

The field descriptions are as follows:

Field name

Field type

Description

resourceId

String

The resource ID.

ownerName

String

The name of the resource owner.

resourceVersion

Long

The resource version.

name

String

The resource name.

dsDeployId

String

The ID of the API published in DataService Studio.

workspaceName

String

The workspace name.

id

String

The unique identifier of the resource.

type

String

The type of the resource. Valid values:

  • 1: API.

  • 2: Function.

  • 3: Service orchestration.

ownerId

String

The base ID of the resource owner.

url

String

The URL for DataService Studio.

workspaceId

String

The workspace ID.

DataService Studio event list

Event list

Event type

Events (and operations that generate events)

Normal event

Extension point event

EventBridge event type

(Type)

Extension program event type (eventCode)

Data quality check

Feedback on check results

  • User feedback on check results

image

image

dataworks:DqcCheck:DqcCheckFeedbackEvent

dqc-check-feedback-event

Check completed

  • Sends rule check results (whether it passed, sample and other information) after the rule check is completed

image

image

dataworks:DqcCheck:DqcCheckFinishedEvent

dqc-check-finished-event

Data Quality rule prerequisite

Batch create Data Quality rule prerequisite event

image

image

dataworks:DqcCheck:BatchCreateDataQualityRules

batch-create-data-quality-rules

Batch update Data Quality rule prerequisite event

image

image

dataworks:DqcCheck:BatchUpdateDataQualityRules

batch-update-data-quality-rules

Batch delete data quality rule event

image

image

dataworks:DqcCheck:BatchDeleteDataQualityRules

batch-delete-data-quality-rules

Update data quality rule prerequisite event

image

image

dataworks:DqcCheck:UpdateDataQualityRule

update-data-quality-rule

Data Quality monitoring prerequisite

Create Data Quality monitoring prerequisite event

image

image

dataworks:DqcCheck:CreateDataQualityEvaluationTask

create-data-quality-evaluation-task

Update Data Quality monitoring prerequisite event

image

image

dataworks:DqcCheck:UpdateDataQualityEvaluationTask

update-data-quality-evaluation-task

Clone Data Quality monitoring event

image

image

dataworks:DqcCheck:CloneDataQualityEvaluationTask

clone-data-quality-evaluation-task

Batch delete data quality monitoring prerequisite events

image

image

dataworks:DqcCheck:BatchDeleteDataQualityEvaluationTasks

batch-delete-data-quality-evaluation-tasks

Data quality monitoring alert subscription prerequisite

Create data quality monitoring alert subscription prerequisite event

image

image

dataworks:DqcCheck:CreateDataQualityEvaluationTaskNotification

create-data-quality-evaluation-task-notification

Update data quality monitoring alert subscription prerequisite events

image

image

dataworks:DqcCheck:UpdateDataQualityEvaluationTaskNotification

update-data-quality-evaluation-task-notification

Delete Data Quality monitoring alert subscription event

image

image

dataworks:DqcCheck:DeleteDataQualityEvaluationTaskNotification

delete-data-quality-evaluation-task-notification

Message format

API call

  • The message entity format for data quality check result feedback events (the content of the data field in the event message) is shown in the following example.

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "ruleCheckId": 521771452,
        "feedbackContent": "Skip",
        "ruleId": 28610334,
        "createUser": "110755000425****",
        "taskId": "167644814****9a26ecf4063a88797",
        "beginTime": "1676448145000",
        "envType": "ODPS",
        "projectName": "test_mc_2303_kongjian",
        "projectId": 9***4,
        "tenantId": 28***656
      }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    ruleId

    Long

    The ID of the monitoring rule.

    ruleCheckId

    Long

    The auto-increment ID of the check result.

    feedbackContent

    String

    The feedback content.

    createUser

    String

    The ID of the user who provides the feedback.

    taskid

    String

    The ID of the node that is associated with the monitoring rule.

    beginTime

    String

    The time when the feedback is provided.

    envType

    String

    The type of the data source to which the table associated with the monitoring rule belongs. Valid values: ODPS, EMR, and HOLO.

    projectName

    String

    The name of the data source to which the table associated with the monitoring rule belongs.

    projectId

    Long

    The DataWorks workspace ID.

    tenantId

    Long

    The ID of the DataWorks tenant.

  • The message entity format for data quality check completion events (the content of the data field in the event message) is shown in the following example.

    {
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
        "projectId": 9***4,
        "tenantId": 28***656,
        "id": 52177****,
        "taskId": "1671***7a6",
        "entityId": 1562***,
        "ruleId": 28610334,
        "property": "-",
        "bizdate": "2023-02-09 00:00:00",
        "dateType": "YMD",
        "actualExpression": "ds\u003d20230210",
        "matchExpression": "ds\u003d$[yyyymmdd]",
        "blockType": 1,
        "checkResult": 0,
        "eventCode": "dqc-check-finished-event",
        "checkResultStatus": 0,
        "methodName": "table_count",
        "beginTime": "2023-02-15 20:14:48",
        "endTime": "2023-02-15 20:14:55",
        "timeConsuming": "7s",
        "externalType": "CWF2",
        "externalId": "triggerByManual",
        "discrete": false,
        "fixedCheck": true,
        "referenceValue": [
          {
            "bizDate": "3000-12-31 00:00:00",
            "discreteProperty": "Number of rows, one day difference",
            "value": 0.0,
            "singleCheckResult": 0
          }
        ],
        "sampleValue": [
          {
            "bizDate": "2023-02-09 00:00:00",
            "value": 3.0
          }
        ],
        "trend": "\u003e\u003d",
        "expectValue": 0.0,
        "op": "\u003e\u003d",
        "projectName": "test_mc_2303_kongjian",
        "tableName": "sx_dim_1209_001",
        "templateId": 47,
        "checkerType": 0,
        "ruleName": "Difference compared with the previous day",
        "isPrediction": false,
        "feedbackStatus": 0,
        "whetherToFilterDirtyData": false
      }
    }

    Field descriptions:

    Field name

    Field type

    Description

    id

    Long

    The ID of the primary key for the check process. Each time a check is triggered, a record of the primary key ID is added.

    projectId

    Long

    The DataWorks workspace ID

    tenantId

    Long

    The DataWorks tenant ID

    taskId

    String

    The ID of the monitoring task.

    entityId

    Long

    The partition filter expression ID.

    ruleId

    Long

    The ID of the rule.

    property

    String

    The field whose data quality is checked based on the monitoring rule. This field is a column in the data source table that is monitored.

    bizdate

    Long

    The data timestamp. If the monitored business entity is offline data, the value is usually one day before the monitoring is performed.

    dateType

    String

    The type of the scheduling cycle. Usually YMD, which means yearly tasks, monthly tasks, and daily tasks.

    actualExpression

    String

    The partition in the monitored data source table.

    matchExpression

    String

    The partition filter expression.

    blockType

    Integer

    The strength type of the monitoring rule. The strength type of a monitoring rule indicates the importance of the rule. Valid values:

    • 1: the monitoring rule is a strong rule.

    • 0: the monitoring rule is a weak rule.

    You can specify the strength of a monitoring rule based on your business requirements. If a strong rule is used and a critical alert is reported, nodes are blocked.

    checkResult

    Integer

    The status of the check result. Valid values:

    • -1: An exception occurs during the check.

    • 0: The monitored data passes the quality check.

    • 1: The warning threshold is exceeded.

    • 2: The critical threshold is exceeded.

    methodName

    String

    The method used to collect sample data, such as avg, count, sum, min, max, count_distinct, user_defined, table_count, table_size, table_dt_load_count, table_dt_refuseload_count, null_value, null_value/table_count, (table_count-count_distinct)/table_count, or table_count-count_distinct.

    beginTime

    Long

    The time when the monitoring started.

    endTime

    Long

    The time when the monitoring ended.

    timeConsuming

    String

    The time that was taken to run the monitoring task.

    externalType

    String

    The type of the scheduling system. Only CWF2 is supported. If externalType is empty, it indicates a manually triggered task.

    externalId

    String

    • When externalType is CWF2, this parameter indicates the ID of the scheduling node.

    • When externalType is empty, the value is triggerByManual, which indicates a manually triggered task.

    discrete

    Boolean

    Indicates whether discrete monitoring is performed. Valid values:

    • true: indicates that discrete monitoring is performed.

    • false: indicates that the monitoring is not discrete monitoring.

    fixedCheck

    Boolean

    Indicates whether the monitoring is performed based on a fixed value. Valid values:

    • true: indicates that the monitoring is performed based on a fixed value.

    • false: indicates that the monitoring is performed based on a non-fixed value.

    referenceValue

    The historical sample values.

    bizDate

    Long

    The data timestamp. If the monitored business entity is offline data, the value is usually one day before the monitoring is performed.

    discreteProperty

    String

    The values of the sample field that are grouped by using the GROUP BY clause. For example, the values of the Gender field are grouped by using the GROUP BY clause. In this case, the values of the DiscreteProperty parameter are Male, Female, and null.

    value

    Decimal

    The sample value.

    singleCheckResult

    Integer

    The string of the monitoring result.

    sampleValue

    The current sample values.

    bizDate

    Long

    The data timestamp. If the monitored business entity is offline data, the value is usually one day before the monitoring is performed.

    value

    Decimal

    The sample value.

    trend

    String

    The trend of the monitoring results.

    expectValue

    Double

    The expected value.

    op

    String

    The comparison operator.

    projectName

    String

    The name of the compute engine or data source whose data quality is monitored.

    tableName

    String

    The name of the table that is monitored.

    templateId

    Integer

    The ID of the monitoring template that is used to create the monitoring rule.

    checkerType

    Integer

    The type of the checker.

    ruleName

    String

    The name of the monitoring rule.

    isPrediction

    Boolean

    Indicates whether the monitoring result is the same as the predicted result. Valid values:

    • true: indicates that the monitoring result is the same as the predicted result.

    • false: indicates that the monitoring result is different from the predicted result.

    comment

    String

    The description of the monitoring rule.

    eventCode

    String

    The event code of the extension point event.

Data Quality rule pre-events (batch create data quality rules, batch update data quality rules, batch delete data quality rules, update data quality rule)

  • Batch create data quality rules pre-event message entity format (the content of the data field in the event message) example is as follows.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
          "eventCode": "batch-create-data-quality-rules",
          "projectId": 30***03,
          "tenantId": 28***656,
          "operator": "19***735",
          "operationTime": 1734505954897,
          "dataQualityTaskId": 1001,
          "target": {
            "databaseType": "maxcompute",
            "tableGuid": "odps.project_demo.tb_table_demo"
          },
          "rules": [
            {
              "name": "Table row count greater than 0",
              "enabled": true,
              "severity": "High",
              "description": "Data quality rule creation operation check test",
              "templateCode": "system:table:table_count:fixed:0",
              "samplingConfig": {
                "metric": "count"
              },
              "checkingConfig": {
                "type": "fixed",
                "thresholds": {
                  "expected": {
                    "expression": "$checkValue > 0"
                  },
                  "critical": {
                    "expression": "$checkValue <= 0"
                  }
                }
              }
            }
          ]
        }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    projectId

    List

    The ID of the DataWorks workspace.

    operator

    String

    The UID of the operator.

    operationTime

    Long

    The operation time.

    dataQualityTaskId

    Long

    The ID of the Data Quality monitoring task associated with the rule. This field can be empty.

    target

    DataQualityTarget

    The monitored object of the Data Quality rule.

    databaseType

    String

    The type of the database to which the table belongs. Valid values:

    • MaxCompute

    • EMR

    • CDH

    • Hologres

    • AnalyticDB for PostgreSQL

    tableGuid

    String

    The unique ID of the table in Data Map.

    rules

    List<DataQualityRule>

    The list of Data Quality rules.

    name

    String

    The name of the rule.

    enabled

    Boolean

    Indicates whether the rule is enabled.

    severity

    String

    The importance level of the rule for business (corresponding to strong or soft rules on the page).

    • High

    • Normal

    description

    String

    The description of the rule.

    templateCode

    String

    The template used by the rule.

    samplingConfig

    SamplingConfig

    The sampling settings.

    metric

    String

    The metrics used for sampling. Valid values:

    • Count: the number of rows in the table.

    • Min: the minimum value of the field.

    • Max: the maximum value of the field.

    • Avg: the average value of the field.

    • DistinctCount: the number of unique values of the field after deduplication.

    • DistinctPercent: the percentage of the number of unique values of the field after deduplication to the number of rows in the table.

    • DuplicatedCount: the number of duplicated values in the field.

    • DuplicatedPercent: the percentage of the number of duplicated values of the field to the number of rows in the table.

    • TableSize: the table size.

    • NullValueCount: the number of rows in which the field value is null.

    • NullValuePercent: the percentage of the number of rows in which the field is set to null to the number of rows in the table.

    • GroupCount: the field value and the number of rows for each field value.

    • CountNotIn: the number of rows in which the field values are different from the referenced values that you specified in the rule.

    • CountDistinctNotIn: the number of unique values that are different from the referenced values that you specified in the rule after deduplication.

    • UserDefinedSql: uses custom SQL for sample collection.

    checkingConfig

    CheckingConfig

    The check settings for sample data.

    type

    String

    The threshold calculation method. Valid values:

    • Fixed

    • Fluctation

    • FluctationDiscreate

    • Auto

    • Average

    • Variance

    thresholds

    Thresholds

    The threshold settings.

    expected

    Threshold

    The expected threshold setting.

    expression

    String

    The threshold expression.

    critical

    Threshold

    The threshold settings for critical alerts.

  • Batch update data quality rules pre-event message entity format (the content of the data field in the event message) example is as follows.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
          "eventCode": "update-data-quality-rule",
          "projectId": 30***03,
          "tenantId": 28***656,
          "operator": "19***735",
          "operationTime": 1734505954897,
          "id": 100001,
          "name": "Table row count greater than 0",
          "enabled": true,
          "severity": "High",
          "description": "Data quality rule creation operation check test",
          "templateCode": "system:table:table_count:fixed:0",
          "samplingConfig": {
            "metric": "count"
          },
          "checkingConfig": {
            "type": "fixed",
            "thresholds": {
              "expected": {
                "expression": "$checkValue > 0"
              },
              "critical": {
                "expression": "$checkValue <= 0"
              }
            }
          }
        }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    eventCode

    String

    The code of the event.

    projectId

    Long

    The ID of the workspace.

    tenantId

    Long

    The tenant ID.

    operator

    String

    The ID of the Alibaba Cloud account.

    operationTime

    Long

    The operation time.

    id

    Long

    The ID of the rule.

    name

    String

    The name of the rule.

    enabled

    Boolean

    Indicates whether the rule is enabled.

    true: The rule is enabled.

    false: The rule is not enabled.

    severity

    String

    The importance level of the rule for business (corresponding to strong or soft rules on the page).

    • High

    • Normal

    description

    String

    The description of the rule.

    templateCode

    String

    The configuration of the partitioned table.

    samplingConfig

    SamplingConfig

    The sampling settings.

    metric

    String

    The metrics used for sampling. Valid values:

    • Count: the number of rows in the table.

    • Min: the minimum value of the field.

    • Max: the maximum value of the field.

    • Avg: the average value of the field.

    • DistinctCount: the number of unique values of the field after deduplication.

    • DistinctPercent: the percentage of the number of unique values of the field after deduplication to the number of rows in the table.

    • DuplicatedCount: the number of duplicated values in the field.

    • DuplicatedPercent: the percentage of the number of duplicated values of the field to the number of rows in the table.

    • TableSize: the table size.

    • NullValueCount: the number of rows in which the field value is null.

    • NullValuePercent: the percentage of the number of rows in which the field is set to null to the number of rows in the table.

    • GroupCount: the field value and the number of rows for each field value.

    • CountNotIn: the number of rows in which the field values are different from the referenced values that you specified in the rule.

    • CountDistinctNotIn: the number of unique values that are different from the referenced values that you specified in the rule after deduplication.

    • UserDefinedSql: uses custom SQL for sample collection.

    checkingConfig

    CheckingConfig

    The check settings for sample data.

    type

    String

    The threshold calculation method. Valid values:

    • Fixed

    • Fluctation

    • FluctationDiscreate

    • Auto

    • Average

    • Variance

    thresholds

    Thresholds

    The threshold settings.

    expected

    Threshold

    The expected threshold setting.

    expression

    String

    The threshold expression.

    critical

    Threshold

    The threshold settings for critical alerts.

  • Batch delete data quality rules pre-event message entity format (the content of the data field in the event message) example is as follows.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
            "eventCode": "batch-delete-data-quality-rules",
            "ids": [
                10***01,
                10***02,
                10***03
            ],
            "projectId": 30***03,
            "tenantId": 524***4736,
            "operator": "19***735",
            "operationTime": 1734505954897
        }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    projectId

    List

    The ID of the DataWorks workspace.

    operator

    String

    The UID of the operator.

    operationTime

    Long

    The operation time.

    ids

    List<Long>

    The list of deleted Data Quality rule IDs.

    tenantId

    String

    The tenant ID.

    eventCode

    String

    The code of the event.

  • Update data quality rule pre-event message entity format (the content of the data field in the event message) example is as follows.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
          "eventCode": "update-data-quality-rule",
          "projectId": 30***03,
          "tenantId": 524***4736,
          "operator": "110***3538",
          "operationTime": 1734505954897,
          "id": 100001,
          "name": "Table row count greater than 0",
          "enabled": true,
          "severity": "High",
          "description": "Data quality rule creation operation check test",
          "templateCode": "system:table:table_count:fixed:0",
          "samplingConfig": {
            "metric": "count"
          },
          "checkingConfig": {
            "type": "fixed",
            "thresholds": {
              "expected": {
                "expression": "$checkValue > 0"
              },
              "critical": {
                "expression": "$checkValue <= 0"
              }
            }
          }
        }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    eventCode

    String

    The code of the event.

    projectId

    Long

    The ID of the workspace.

    tenantId

    Long

    The tenant ID.

    operator

    String

    The ID of the Alibaba Cloud account.

    operationTime

    Long

    The operation time.

    id

    Long

    The ID of the rule.

    name

    String

    The name of the rule.

    enabled

    Boolean

    Indicates whether the rule is enabled.

    true: The rule is enabled.

    false: The rule is not enabled.

    severity

    String

    The importance level of the rule for business (corresponding to strong or soft rules on the page).

    • High

    • Normal

    description

    String

    The description of the rule.

    templateCode

    String

    The configuration of the partitioned table.

    samplingConfig

    SamplingConfig

    The sampling settings.

    metric

    String

    The metrics used for sampling. Valid values:

    • Count: the number of rows in the table.

    • Min: the minimum value of the field.

    • Max: the maximum value of the field.

    • Avg: the average value of the field.

    • DistinctCount: the number of unique values of the field after deduplication.

    • DistinctPercent: the percentage of the number of unique values of the field after deduplication to the number of rows in the table.

    • DuplicatedCount: the number of duplicated values in the field.

    • DuplicatedPercent: the percentage of the number of duplicated values of the field to the number of rows in the table.

    • TableSize: the table size.

    • NullValueCount: the number of rows in which the field value is null.

    • NullValuePercent: the percentage of the number of rows in which the field is set to null to the number of rows in the table.

    • GroupCount: the field value and the number of rows for each field value.

    • CountNotIn: the number of rows in which the field values are different from the referenced values that you specified in the rule.

    • CountDistinctNotIn: the number of unique values that are different from the referenced values that you specified in the rule after deduplication.

    • UserDefinedSql: uses custom SQL for sample collection.

    checkingConfig

    CheckingConfig

    The check settings for sample data.

    type

    String

    The threshold calculation method. Valid values:

    • Fixed

    • Fluctation

    • FluctationDiscreate

    • Auto

    • Average

    • Variance

    thresholds

    Thresholds

    The threshold settings.

    expected

    Threshold

    The expected threshold setting.

    expression

    String

    The threshold expression.

    critical

    Threshold

    The threshold settings for critical alerts.

Data quality monitoring pre-events (Create data quality monitoring, Update data quality monitoring, Clone data quality monitoring, Batch delete data quality monitoring)

  • Create and update data quality monitoring pre-events message entity format (the content of the data field in the event message) example is as follows.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
          "eventCode": "create-data-quality-evaluation-task",
          "name": "Table data accuracy monitoring",
          "description": "After the scheduling instance that writes data to the table is successfully executed, the monitoring is triggered to check whether the output data meets expectations",
          "target": {
            "databaseType": "emr",
            "tableGuid": "an-emr-table-guid"
          },
          "trigger": {
            "type": "ByScheduledTaskInstance",
            "taskIds": [
              1001,
              1002
            ]
          },
          "dataSourceId": 201,
          "runtimeConf": "{ \"queue\": \"default\", \"sqlEngine\": \"HIVE_SQL\" }",
          "rules": [
            {
              "name": "Table row count greater than 0",
              "enabled": true,
              "severity": "High",
              "description": "Data quality rule creation operation check test",
              "templateCode": "system:table:table_count:fixed:0",
              "samplingConfig": {
                "metric": "count"
              },
              "checkingConfig": {
                "type": "fixed",
                "thresholds": {
                  "expected": {
                    "expression": "$checkValue > 0"
                  },
                  "critical": {
                    "expression": "$checkValue <= 0"
                  }
                }
              }
            }, 
            {
              "id": 100002
              "name": "Table row count greater than 100",
              "checkingConfig": {
                "type": "fixed",
                "thresholds": {
                  "expected": {
                    "expression": "$checkValue > 100"
                  },
                  "critical": {
                    "expression": "$checkValue <= 100"
                  }
                }
              }
            }
          ],
          "hooks": [
            {
              "type": "BlockTaskInstance",
              "condition": "(${severity} == \"High\" AND ${status} == \"Critical\") OR (${severity} == \"High\" AND ${status} == \"Error\")"
            }
          ],
          "notifications": {
            "condition": "(${severity} == \"High\" AND ${status} == \"Warned\") OR (${severity} == \"Normal\" AND ${status} == \"Critical\") OR (${severity} == \"Normal\" AND ${status} == \"Warned\") OR (${severity} == \"Normal\" AND ${status} == \"Error\")",
            "notifications": [
              {
                "channels": [
                  "Mail",
                  "Sms"
                ],
                "notificaionReceivers": [
                  {
                    "receiverType": "AliUid",
                    "receiverValues": [
                      "1107550004253538", 
                      "51107550004253538"
                    ]
                  }
                ]
              }, 
              {
                "channels": [
                  "Dingding"
                ],
                "notificaionReceivers": [
                  {
                    "receiverType": "DingdingUrl",
                    "receiverValues": [
                      "https://api.dingding.com/message-boxes/b1/messages",
                      "https://api.dingding.com/message-boxes/b2/messages"
                    ],
                    "extension": "{ \"atAll\": true }"
                  }
                ]
              }
            ]
          },
          "projectId": 30***03,
          "tenantId": 524***4736,
          "operator": "110***3538",
          "operationTime": 1734505954897
        }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    eventCode

    String

    The code of the security event.

    name

    String

    The name of the monitor.

    description

    String

    The description of the data quality check task.

    target

    DataQualityTarget

    The monitored object of the monitor.

    databaseType

    String

    The type of the database to which the table belongs. Valid values:

    • MaxCompute

    • EMR

    • CDH

    • Hologres

    • AnalyticDB for PostgreSQL

    tableGuid

    String

    The unique ID of the table in Data Map.

    trigger

    DataQualityEvaluationTaskTrigger

    The trigger configuration of the monitor.

    type

    String

    The type of event that can trigger the quality check task execution.

    • ByScheduledTaskInstance: The scheduling instance is successfully executed. This is supported only in public cloud scenarios.

    • ByManual: The task is manually triggered.

    taskIds

    Array<Long>

    This parameter takes effect when type=ByScheduledTaskInstance. It specifies which scheduling node instances can trigger the task after they are successfully executed.

    dataSourceId

    Long

    The data source that the data quality check task uses when it is executed.

    runtimeConf

    String

    The settings when using the data source. Currently, you can only specify the YARN queue of EMR and specify the SQL engine as SPARK-SQL when collecting EMR tables.

    rules

    List<DataQualityRule>

    The list of data quality rules. For more information about the parameters, see Data quality rule pre-event parameters.

    hooks

    Array<DataQualityEvaluationTaskHook>

    The callback settings in the lifecycle of the data quality check task instance. Currently, only one hook that blocks the scheduling task is supported.

    type

    String

    The type of subsequent processing action.

    BlockTaskInstance: Blocks the execution of the DataWorks task instance.

    condition

    String

    The condition for triggering the hook.

    notifications

    Array<Notification>

    The specific message notification settings.

    projectId

    Long

    The ID of the workspace.

    tenantId

    Long

    The tenant ID.

    operator

    String

    The UID of the Alibaba Cloud account.

    operationTime

    Long

    The operation time.

  • Clone data quality monitoring pre-event message entity format (the content of the data field in the event message) example is as follows.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
          "eventCode": "clone-data-quality-evaluation-task",
          "id": 10001,
          "targets": [
            {
              "databaseType": "emr",
              "tableGuid": "an-emr-table-guid"
            },
            {
              "databaseType": "emr",
              "tableGuid": "another-emr-table-guid"
            }
          ],
          "projectId": 9***4,
          "tenantId": 28***656,
          "operator": "19***735",
          "operationTime": 1734505954897
        }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    projectId

    Long

    The ID of the DataWorks workspace.

    tenantId

    String

    The tenant ID.

    operator

    String

    The UID of the Alibaba Cloud account.

    operationTime

    Long

    The operation time.

    targets

    List<DataQualityTarget>

    The data quality monitoring targets to which the monitor is cloned.

    databaseType

    String

    The type of the database to which the table belongs. Valid values:

    • MaxCompute

    • EMR

    • CDH

    • Hologres

    • AnalyticDB for PostgreSQL

    tableGuid

    String

    The unique ID of the table in Data Map.

    id

    Long

    The ID of the source data quality monitor used for cloning.

    eventCode

    String

    The code of the security event.

  • Batch delete data quality monitoring pre-event message entity format (the content of the data field in the event message) example is as follows.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
          "eventCode": "batch-delete-data-quality-evaluation-tasks",
          "ids": [
            10001,
            10002
          ],
          "projectId": 9***4,
          "tenantId": 28***656,
          "operator": "19***735",
          "operationTime": 1734505954897
        }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    projectId

    Long

    The ID of the DataWorks workspace.

    operator

    String

    The UID of the Alibaba Cloud account.

    operationTime

    Long

    The operation time.

    ids

    List<Long>

    The list of deleted data quality monitor IDs.

    tenantId

    String

    The tenant ID.

    eventCode

    String

    The code of the security event.

Data quality monitoring alert subscription pre-events (Create data quality monitoring alert subscription, Update data quality monitoring alert subscription, Delete data quality monitoring alert subscription)

  • The message entity format for Create and delete data quality monitoring alert subscription pre-events (the content of the data field in the event message) is shown in the following example.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
          "eventCode": "create-data-quality-evaluation-task-notification",
          "dataQualityEvaluationTaskId": 10001,
          "channel": "sms",
          "receiverValue": "1107***38",
          "projectId": 30***03,
          "operator": "110***3538",
          "operationTime": 1734505954897
        }
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    projectId

    Long

    The DataWorks workspace ID.

    operator

    String

    The UID of the user who performed the operation.

    operationTime

    Long

    The operation time.

    dataQualityEvaluationTaskId

    Long

    The data quality monitoring ID.

    channel

    String

    The channel type for sending subscription messages.

    • Mail - Email

    • Sms - Text message

    • Phone - Phone

    • Feishu - Lark

    • Weixin - WeChat

    • Dingding - DingTalk

    • Webhook - Custom Webhook

    receiverValue

    String

    The specific target for sending subscription messages.

    eventCode

    String

    The code of the event.

  • The message entity format for Create data quality monitoring pre-event (the content of the data field in the event message) is shown in the following example.

    {
        "datacontenttype": "application/json;charset=utf-8",
        "data": {
          "eventCode": "update-data-quality-evaluation-task-notification",
          "dataQualityEvaluationTaskId": 10001,
          "currentChannel": "sms",
          "currentReceiverValue": "1107***538",
          "updatedChannel": "sms",
          "updatedReceiverValue": "1107***538",
          "projectId": 30***03,
          "operator": "110***3538",
          "operationTime": 1734505954897
        
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    projectId

    Long

    The DataWorks workspace ID.

    operator

    String

    The UID of the user who performed the operation.

    operationTime

    Long

    The operation time.

    dataQualityEvaluationTaskId

    Long

    The data quality monitoring ID.

    currentChannel

    String

    The channel type for sending subscription messages that is being updated.

    • Mail - Email

    • Sms - Text message

    • Phone - Phone

    • Feishu - Lark

    • Weixin - WeChat

    • Dingding - DingTalk

    • Webhook - Custom Webhook

    currentReceiverValue

    String

    The specific target for sending subscription messages that is being updated.

    updatedChannel

    String

    The updated channel type for sending subscription messages.

    • Mail - Email

    • Sms - Text message

    • Phone - Phone

    • Feishu - Lark

    • Weixin - WeChat

    • Dingding - DingTalk

    • Webhook - Custom Webhook

    updatedReceiverValue

    String

    The updated specific target for sending subscription messages.

    eventCode

    String

    The code of the event.

Tenant-level events

Tenant-level modules generate tenant-level events, such as event messages generated when a workspace is deleted from the console. You can refer to the event list below to understand which event messages supported by each module are regular events, which are extension point events, and the corresponding message formats for these events.

The following message format tabs only contain partial content. For the complete message sent to EventBridge or Function Compute, you need to refer to Appendix: Message formats.

Console event list

Event list

Event type

Event (and operation that generates the event)

Regular event

Extension point event

EventBridge event type (Type)

Extension event type (eventCode)

Delete a project

Delete a workspace (pre-event)

image

image

dataworks:ProjectChange:DeleteProject

delete-project

Delete a workspace (post-event)

image

image

dataworks:ProjectChange:ProjectDeleted

project-deleted

Message format

Message entity format: Delete project event

  • The message entity format for the tenant delete project pre-event (the content of the data field in the event message) is shown in the following example.

    {
     
      "data": {
        "eventCode": "delete-project",
        "projectId": 7***7, // The ID of the workspace.
        "tenantId": 2807****0784, // The ID of the tenant.
        "operator": "19***735
    }

    The following table describes the fields:

    Field name

    Field type

    Description

    operator

    String

    The UID of the user who deletes the DataWorks workspace.

    projectId

    Long

    The ID of the DataWorks workspace that you want to delete.

    tenantId

    Long

    The ID of the tenant to which the workspace that you want to delete belongs.

    eventCode

    String

    The event code of the extension point event.

  • The message entity format for the tenant delete project post-event (the content of the data field in the event message) is shown in the following example.

    {
        
        "data": {
            "eventCode": "project-deleted",
            "tenantId": 28***656,
            "blockBusiness": false,
            "projectName": "test2",
            "projectId": 9***4,
            "operator": "19***735",
            "timestamp": 1702260556896
       } 
    }

    The following table describes the fields:

    Field name

    Field type

    Description

    operator

    String

    The UID of the user who deletes the DataWorks workspace.

    projectId

    Long

    The ID of the DataWorks workspace that you want to delete.

    projectName

    String

    The name of the DataWorks workspace that you want to delete.

    tenantId

    Long

    The ID of the tenant to which the workspace that you want to delete belongs.

    timestamp

    Long

    The timestamp when the message was sent.

    eventCode

    String

    The event code of the extension point event.

Upload and download event list

Event list

Event type

Event (and operation that generates the event)

Regular event

Extension point event

EventBridge event type (Type)

Extension event type (eventCode)

Data download and upload

Download data (pre-event) - file generation

image

image

dataworks:ResourcesDownload:DownloadResources

download-resources

Download data (pre-event) - file download

image

image

dataworks:ResourcesDownload:DownloadResourcesExecute

download-resources-execute

Upload data (pre-event)

image

image

dataworks:ResourcesUpload:UploadDataToTable

upload-data-to-table

Message format

Data download and upload

  • Download data (pre-event) - file generation message entity format (the content of the data field in the event message) is shown in the following example.

    { 
        "data": {
            "eventCode": "download-resources",
            "moduleType": "sqlx_query",
            "operatorBaseId": "123936573******",
            "operatorUid": "14931896037*******",
            "fileName": "File name.csv",
            "fileSize": 10241024,
            "datasourceId": "1111",
            "datasourceName": "odps_first",
            "queryDwProjectId": "9***4",
            "queryDwProjectName": "test_project",
            "dataRowSize": "123456",
            "sqlText": "select sku_code, sku_name from dim_sku",
        }

    The following table describes the fields:

    Field name

    Field type

    Description

    moduleType

    String

    Source of data that you can download:

    • entity_transfer: Data downloaded from Security Center > Security Policy > Entity Change Owner > Change Owner Log.

    • develop_query: Data queried and downloaded by using SQL statements in Data Development (DataStudio).

    • sqlx_query: Data queried and downloaded by using SQL statements in DataAnalysis > SQL Query.

    • dw_excel: Data downloaded from DataAnalysis > Workbook.

    operatorBaseId

    String

    The base ID of the user who downloads data.

    operatorUid

    String

    The UID of the user who downloads data.

    fileName

    String

    The name of the downloaded file.

    fileSize

    Long

    The size of the downloaded file.

    datasourceId

    String

    The ID of the data source to which the downloaded data belongs.

    datasourceName

    String

    The name of the data source to which the downloaded data belongs.

    queryDwProjectId

    String

    The ID of the DataWorks workspace to which the downloaded data belongs.

    queryDwProjectName

    String

    The name of the DataWorks workspace to which the downloaded data belongs.

    dataRowSize

    Long

    The number of downloaded data records.

    sqlText

    String

    The SQL statement that is used to query and download data.

    eventCode

    String

    The event type of the extension point event.

  • Download data (pre-event) - file download message entity format (the content of the data field in the event message) is shown in the following example.

    {
      "datacontenttype": "application/json;charset=utf-8",
      "aliyunaccountid": "1493189603770213",
      "aliyunpublishtime": "2023-12-11T02:10:00.194Z",
      "data": {
        "eventCode": "download-resources-execute",
        "moduleType": "sqlx_query",
        "operatorBaseId": "123936573******",
        "operatorUid": "14931896037*******",
        "fileName": "File name.csv",
        "fileSize": 10241024,
        "datasourceId": "1111",
        "datasourceName": "odps_first",
        "queryDwProjectId": "9***4",
        "queryDwProjectName": "test_project",
        "dataRowSize": "123456",
        "sqlText": "select sku_code, sku_name from dim_sku",
        "ip": "198.10.X.X"
      },
      "aliyunoriginalaccountid": "149318960******",
      "specversion": "1.0",
      "aliyuneventbusname": "default",
      "id": "2c3e41e5-3486-40ce-87d4-910f989cf2a7",
      "source": "acs.dataworks",
      "time": "2023-12-11T10:10:00.117Z",
      "aliyunregionid": "cn-shanghai",
      "type": "dataworks:ResourcesDownload:DownloadResourcesExecute"
    }

    The following table describes the key fields in the preceding sample code.

    Field name

    Field type

    Description

    moduleType

    String

    Source of data that you can download:

    • entity_transfer: Data downloaded from Security Center > Security Policy > Entity Change Owner > Change Owner Log.

    • develop_query: Data queried and downloaded by using SQL statements in Data Development (DataStudio).

    • sqlx_query: Data queried and downloaded by using SQL statements in DataAnalysis > SQL Query.

    • dw_excel: Data downloaded from DataAnalysis > Workbook.

    operatorBaseId

    String

    The base ID of the user who downloads data.

    operatorUid

    String

    The UID of the user who downloads data.

    fileName

    String

    The name of the downloaded file.

    fileSize

    Long

    The size of the downloaded file.

    datasourceId

    String

    The ID of the data source to which the downloaded data belongs.

    datasourceName

    String

    The name of the data source to which the downloaded data belongs.

    queryDwProjectId

    String

    The ID of the DataWorks workspace to which the downloaded data belongs.

    queryDwProjectName

    String

    The name of the DataWorks workspace to which the downloaded data belongs.

    dataRowSize

    Long

    The number of downloaded data records.

    sqlText

    String

    The SQL statement that is used to query and download data.

    ip

    String

    The IP address of the device used by the user who downloads data.

    eventCode

    String

    The event type of the extension point event.

  • Upload data (pre-event) message entity format (the content of the data field in the event message) is shown in the following example.

    {
      "datacontenttype": "application/json;charset=utf-8",
      "aliyunaccountid": "1493189603770213",
      "aliyunpublishtime": "2023-12-11T02:10:00.194Z",
      "data": {
        "eventCode": "upload-data-to-table",
        "uploadSourceType": "LOCAL",
        "optTableType": "CREATE",
        "targetEngineType": "MAXCOMPUTE",
        "writeType": "OVERWRITE",
        "conflictMode": "IGNORE",
        "operatorBaseId": "12312*****",
        "operatorUid": "1222222*****",
        "datasourceId": "1111",
        "datasourceName": "odps_first",
        "tableGuid": "odps.mc_project.test_table",
        "queryDwProjectId": "9***4",
        "queryDwProjectName": "test_project",
        "fileSize": 123456
      },
      "aliyunoriginalaccountid": "149318960******",
      "specversion": "1.0",
      "aliyuneventbusname": "default",
      "id": "2c3e41e5-3486-40ce-87d4-910f989cf2a7",
      "source": "acs.dataworks",
      "time": "2023-12-11T10:10:00.117Z",
      "aliyunregionid": "cn-shanghai",
      "type": "dataworks:ResourcesUpload:UploadDataToTable"
    }

    The following table describes the fields:

    Field name

    Field type

    Description

    uploadSourceType

    String

    Source of data that you can upload:

    • LOCAL: uploads on-premises files.

    • OSS: uploads Object Storage Service (OSS) objects.

    • DW_EXCEL: uploads data from DataAnalysis > Workbook in DataWorks.

    • HTTP: uploads HTTP files.

    optTableType

    String

    Upload data to an existing table or a new table of the specified compute engine or data source. Valid values:

    • CREATE: uploads data to a new table.

    • IMPORT: uploads data to an existing table.

    targetEngineType

    String

    The type of compute engine to which you want to upload data. Valid values:

    • MaxCompute

    • EMR Hive

    • Hologres

    writeType

    String

    The mode in which data is written to the destination table. Valid values:

    • OVERWRITE: overwrites data in the destination table.

    • APPEND: appends the uploaded data to the destination table.

    conflictMode

    String

    The policy to handle a primary key conflict that occurs when you write the uploaded data to the destination table. Valid values:

    • IGNORE: If a primary key conflict occurs, ignore the uploaded data.

    • REPLACE: If a primary key conflict occurs, delete the row that contains the conflicting data and then insert the uploaded data into the row. Fields that are not specified by the uploaded data are written as NULL.

    • UPDATE: The uploaded data overwrites data in the destination table. Only data of the fields specified by the uploaded data is overwritten. The data of unspecified fields in the destination table remains unchanged.

    operatorBaseId

    String

    The base ID of the user who uploads data.

    operatorUid

    String

    The UID of the user who uploads data.

    datasourceId

    String

    The ID of the data source to which you want to upload data.

    datasourceName

    String

    The name of the data source to which you want to upload data.

    tableGuid

    String

    The GUID of the table. For example:

    • MaxCompute: odps.maxcomputeProject.tableName.

    • EMR_Hive: emr_hive.emr cluster id.schema.tableName.

    • Holo: holo.hologres instance id.database.

    queryDwProjectId

    String

    The ID of the DataWorks workspace to which the table belongs.

    queryDwProjectName

    String

    The name of the DataWorks workspace to which the table belongs.

    fileSize

    Long

    The size of the file to be uploaded. Unit: bytes.

    eventCode

    String

    The event code of the extension point event.

Appendix: Message formats

Message formats sent to EventBridge

After configuring an event distribution channel in Open Event (OpenEvent), when a workspace-level or tenant-level event is triggered in DataWorks, the event is filtered based on the event type (Type) configured in EventBridge. The following shows the message format that DataWorks sends to EventBridge through the event distribution channel.

{ 
 "datacontenttype": "application/json;charset=utf-8",// The content format of data. datacontenttype supports only the application/json content type.
  "data": {
 // The message content varies based on the message type. The following fields are the fixed fields in an event message. For information about the message content of each type of event, see the preceding information.
 "tenantId": 28378****10656,// The tenant ID. Each Alibaba Cloud account in DataWorks corresponds to a tenant, and each tenant has its own tenant ID. You can view this value in the user information in the upper-right corner of the DataWorks Data Development page.
 "eventCode": "xxxx"//
  },
  "id": "539fd8f4-4ea1-4625-aa8b-6c906674****",// The event ID. The ID is the unique identifier of an event.
  "source": "acs.dataworks",// The event source, which indicates the service that produces events. In this example, event messages are pushed by DataWorks.
  "specversion": "1.0",
  "subject": "",
  "time": "2020-11-19T21:04:41+08:00",// The event generation time.
  "type": "dataworks:InstanceStatusChanges:InstanceStatusChanges",// The event type. The Type field is used in the EventBridge console to filter all event messages pushed by DataWorks. Each event has a different event type value. You can refer to the preceding information to obtain the event type.
  "aliyunaccountid": "123456789098****",// The ID of the Alibaba Cloud account.
  "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",// The time when EventBridge receives an event.
  "aliyuneventbusname": "default",// The name of the EventBridge event bus used to receive DataWorks event messages.
  "aliyunregionid": "cn-hangzhou",// The region where events are received.
  "aliyunpublishaddr": "172.25.XX.XX"
}

A complete event message contains information such as the body, ID, source, and generation time of the event message. The following table describes the key fields in the preceding sample code.

Field name

Field type

Description

data

object

The structure of a message body. The structure of a message body and the fields contained in a message body vary based on the type of the event. For more information, see the following sections in this topic:

Message format of Data Development events: Data Development event list.

Message format of Data Integration events: Data Integration event list.

Message format of Operation Center events: Operation Center event list.

Message format of Security Center events: Security Center event list.

Message format of Data Quality events: Data Quality event list.

id

String

The unique ID of the event message. You can identify an event message based on the ID of the event message.

type

String

The event type. This field is used to describe the event type of the event source. Sample values:

  • dataworks:FileChange:CommitFile: indicates commit a file.

  • dataworks:FileChange:DeployFile: indicates deploy a file.

The Type field is used in the EventBridge console to filter all event messages pushed by DataWorks. Each event has a different event type value. You can refer to the preceding information to obtain the event type.

Formats of event messages sent to Function Compute

When you configure Extensions: Function Compute in DataWorks, DataWorks sends the messages of the triggered extension point events to Function Compute in JSON format. The following shows the format of event messages sent to Function Compute.

{
	"blockBusiness": true,
	"eventCategoryType": "resources-download",// The event category.
	"eventType": "upload-data-to-table",// The event type.
	"extensionBizId": "job_6603***070",
	"messageBody": {
             // The message content varies based on the message type. The following fields are the fixed fields in an event message. For information about the message content of each type of event, see the preceding information.
             "tenantId": 28378****10656,// The tenant ID. Each Alibaba Cloud account in DataWorks corresponds to a tenant, and each tenant has its own tenant ID. You can view this value in the user information in the upper-right corner of the DataWorks Data Development page.
             "eventCode": "xxxx"//
	},
	"messageId": "52d44ee7-b51f-4d4d-afeb-*******"// The event ID. The ID is the unique identifier of an event.
}

The following table describes the fields in the preceding sample code.

Field name

Field type

Description

messageId

String

The ID of the event. The ID is the unique identifier of an event.

messageBody

The specific event message pushed by DataWorks. This field is used when an extension is developed. The field value varies based on the message type.

tenantId

The tenant ID. Each Alibaba Cloud account in DataWorks corresponds to a tenant, and each tenant has its own tenant ID. You can view this value in the user information in the upper-right corner of the DataWorks Data Development page

eventCode

The code of the security event. This field is used to identify a type of event message. For the eventCode that corresponds to each event type, see the Extension event type (eventCode) column in the Development reference: Event lists and event message formats table.