This topic describes the event types, the formats of event messages, and the meaning of each field in an event message in DataWorks.
Background information
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 this type of event message. However, the operations that generate this type of event message cannot be blocked. You can use the OpenEvent module to subscribe to this type of event message. For more information, see OpenEvent.
Extension point events: You can subscribe to this type of event message. You can use the Extensions module of DataWorks Open Platform to configure custom responses to this type of event message. For example, if you enable a custom extension to check extension point events in DataWorks and you perform an operation that triggers the check of the custom extension in DataWorks, the operation is blocked until the extension returns the processing result of the event message.
The following tables describe the events supported by each DataWorks service, whether an event is a regular event or an extension point event, the event type defined for an event in EventBridge, and the event code defined for an event in DataWorks Extensions.
Type: The type of an event. This field is used to filter event messages in EventBridge. For more information, see Enable event message subscription.
eventCode: The event code of an event. During on-premises development, you can determine the event type based on the event code in an event message. The event message is sent from DataWorks to EventBridge.
Workspace-level events
Workspace-level services generate workspace-level events. For example, events that are generated after you run nodes in DataStudio are workspace-level events. Events that are generated due to the status change of auto triggered instances in Operation Center are also workspace-level events. You can know from the following tables the events supported by each DataWorks service, whether an event is a regular event or an extension point event, and the message format of an event.
On the Message formats tabs of this section, you can view only partial content of the format of an event message. To view a complete event message sent to EventBridge or Function Compute, see the Appendix: Message formats section in this topic.
Events of DataStudio
Events
Event category | Event and event-generation operation | Regular event | Extension point event | Event type in EventBridge | Event code in Extensions |
Node Change Event | Create a node
|
|
| ||
Update a node
|
|
| |||
File Change Event
| Pre-event for Node Deletion (delete a node in the development environment) Note Deleted files are moved to the recycle bin. |
|
| ||
Pre-event for Node Commit |
|
| |||
Pre-event for Node Deployment |
|
| |||
Pre-event for Code Running |
|
| |||
Table Change Event | Pre-event for Table Commit |
|
| ||
Pre-event for Table Deployment |
|
|
Message formats
Node change events (create and update)
File change events (commit, deploy, run, and delete)
Table change events (commit a table to the development environment and deploy a table to the production environment)
Events of Data Integration
Events
Event category | Event and event-generation operation | Regular event | Extension point event | Event type in EventBridge
| Event code in Extensions |
Node changing | Pre-event for Di-Job Running |
|
| ||
Pre-event for Di-Job Batch Running |
|
|
Message formats
Node change event - Pre-event for Di-Job running
Node change event - Pre-event for Di-Job batch running
Events of Operation Center
Events
Event category | Event and event-generation operation | Regular event | Extension point event | Event type in EventBridge
| Event code in Extensions |
Node Change Event | Delete a node
|
|
| ||
Pre-event for Node Undeploy (undeploy an auto triggered node in the production environment) Note This operation deletes the node in DataStudio and moves the node to the recycle bin. |
|
| |||
Pre-event for Node Frozen |
|
| |||
Pre-event for Node Unfrozen |
|
| |||
Backfill Data Operate Event | Pre-event for Backfill Data |
|
| ||
Node status changing | Change the status of an auto triggered node |
|
| ||
Instance Change Event | Freeze an instance |
|
| ||
Unfreeze an instance |
|
| |||
Terminate an instance |
|
| |||
Rerun an instance
|
|
| |||
Set the status of an instance to Succeeded |
|
| |||
Delete a specified ancestor instance of an instance |
|
| |||
Pre-event for Instance Frozen |
|
| |||
Pre-event for Instance Unfrozen |
|
| |||
Pre-event for Instance Rerun |
|
| |||
Pre-event for Set Instance Success |
|
| |||
Pre-event for Instance Kill |
|
| |||
Delete an expired instance |
|
| |||
Workflow status changing | Change the status of a workflow
|
|
| ||
Monitoring and alerting | Monitor objects and send alert notifications |
|
|
Message formats
Node change events (delete, undeploy, freeze, and unfreeze)
Data backfilling for nodes
Node status change events
Instance change events (freeze, unfreeze, terminate and rerun an instance, and set the instance status to success)
Instance change pre-events (freeze, unfreeze, kill, and rerun an instance, and set the instance status to success)
Instance change event - Delete an expired instance
Events of deleting a specified ancestor instance of an instance
Workflow status change events
Monitoring and alerting
Events of Security Center
Events
Event category | Event and event-generation operation | Regular event | Extension point event | Event type in EventBridge
| Event code in Extensions |
Approval Center | Pre-event for Approval Order Created |
|
| ||
Complete a permission request processing order |
|
| |||
Security Center (table permission requesting) | Request permissions on tables (pre-event) |
|
|
Message formats
Approval Center (create and complete a permission request processing order)
Security Center (Pre-event for table permission request)
Appendix: Authorized content (MaxCompute)
Appendix: Authorized content (DataService)
Events of Data Quality
Events
Event category | Event and event-generation operation | Regular event | Extension point event | Event type in EventBridge
| Event code in Extensions |
Data quality check | Provide feedback on data quality check results
|
| | ||
Report that a data quality check is complete
|
|
| |||
Pre-events for monitoring rules | Pre-event for Data Quality Rules Batch Create |
|
| ||
Pre-event for Data Quality Rules Batch Update |
|
| |||
Pre-event for Data Quality Rules Batch Delete |
|
| |||
Pre-event for Data Quality Rule Update |
|
| |||
Pre-events for monitors | Pre-event for Data Quality Evaluation Task Create |
|
| ||
Pre-event for Data Quality Evaluation Task Update |
|
| |||
Pre-event for Data Quality Evaluation Task Clone |
|
| |||
Pre-event for Data Quality Evaluation Task Batch Delete |
|
| |||
Pre-events for subscription to monitor alerting information | Pre-event for Data Quality Evaluation Task Notification Create |
| create-data-quality-evaluation-task-notification | ||
Pre-event for Data Quality Evaluation Task Notification Update |
|
| |||
Pre-event for Data Quality Evaluation Task Notification Delete |
|
|
Message formats
Data quality check
Pre-events for monitoring rules (create, update, and delete multiple monitoring rules at a time, and update a monitoring rule)
Pre-events for monitors (create, update, and clone a monitor, and delete multiple monitors at a time)
Pre-events for subscription to monitor alerting information (create, update, and delete a data quality evaluation task notification)
Tenant-level events
Tenant-level services generate tenant-level events. For example, an event that is generated when a workspace is deleted in the DataWorks console is a tenant-level event. You can know from the following tables the events supported by each DataWorks service, whether an event is a regular event or an extension point event, and the message format of an event.
On the Message formats tabs of this section, you can view only partial content of the format of an event message. To view a complete event message sent to EventBridge or Function Compute, see the Appendix: Message formats section in this topic.
Events of the DataWorks console
Events
Event category | Event and event-generation operation | Regular event | Extension point event | Event type in EventBridge | Event code in Extensions |
Workspace deletion | Pre-event for Project Delete |
|
| ||
Delete a workspace (post-event) |
|
|
Message formats
Message body for a workspace deletion event
Events of Upload and Download
Events
Event category | Event and event-generation operation | Regular event | Extension point event | Event type in EventBridge | Event code in Extensions |
Data download and upload | Pre-event for Resources Create | dataworks:ResourcesDownload:DownloadResources | download-resources | ||
Pre-event for Resources Download | dataworks:ResourcesDownload:DownloadResourcesExecute | download-resources-execute | |||
Pre-event for Resources Upload | dataworks:ResourcesUpload:UploadDataToTable | upload-data-to-table |
Message formats
Data download and upload
Appendix: Message formats
Formats of event messages sent to EventBridge
After you configure an event distribution channel in OpenEvent, event messages sent to EventBridge can be filtered based on the value of the Type field when workspace-level or tenant-level events are triggered in DataWorks. Sample format of an event message sent to EventBridge by using an event distribution channel:
{ "datacontenttype": "application/json;charset=utf-8",// The content format of data. datacontenttype supports only application/json. "data": { // The message content varies based on the message type. The following two fields are fixed in each 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. Each tenant has its own tenant ID. To view the tenant ID, click the current account in the upper-right corner of the DataStudio page. In the panel that appears, click User Info in the Menu section. You can view the tenant ID in the User Info message. "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. In this example, the event is 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 | Type | Description |
data | object | The body of the event message. 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: For information about message formats of events in DataStudio, see the Events of DataStudio section in this topic. For information about message formats of events in Data Integration, see the Events of Data Integration section in this topic. For information about message formats of events in Operation Center, see the Events of Operation Center section in this topic. For information about message formats of events in Security Center, see the Events of Security Center section in this topic. For information about message formats of events in Data Quality, see the Events of Data Quality section in this topic. |
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 type of the event. This field is used to describe the event type of the event source. Sample values:
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
If you develop and deploy an extension in DataWorks based on Function Compute, the related event message is sent to Function Compute as JSON data when an extension point event that is specified in the extension is triggered. Sample format of an event message 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 two fields are fixed in each 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. Each tenant has its own tenant ID. To view the tenant ID, click the current account in the upper-right corner of the DataStudio page. In the panel that appears, click User Info in the Menu section. You can view the tenant ID in the User Info message. "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 | 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 ID of the tenant. Each Alibaba Cloud account in DataWorks corresponds to a tenant. Each tenant has its own tenant ID. To view the tenant ID, click the current account in the upper-right corner of the DataStudio page. In the panel that appears, click User Info in the Menu section. You can view the tenant ID in the User Info message. | ||
eventCode | The event code. It is used to identify a type of event message. For information about the event code for each event type, see the Event code in Extensions column in each Events table in this topic. |