DataWorks publishes event messages to EventBridge when specific operations occur. This reference lists every supported event, its EventBridge type filter value, extension event code, and the JSON payload structure.
Event categories
DataWorks events fall into two categories:
-
Regular events — Subscribe through OpenEvent. These events fire after an operation completes and do not block DataWorks operations.
-
Extension point events — Subscribe through Extensions. These events fire before an operation begins. DataWorks pauses the operation until your extension returns a result.
Each event carries two identifiers:
| Identifier | Purpose | Example |
|---|---|---|
EventBridge event type (type) |
Filter event messages in EventBridge. See Enable event subscriptions. | dataworks:FileChange:CommitFile |
Extension event code (eventCode) |
Identify the event type in your extension code at runtime. Extracted from the message payload. | commit-file |
Both identifiers follow a consistent naming pattern: dataworks:{Category}:{Action} for type, and a kebab-case action name for eventCode.
When to use each type
| If you need to... | Use |
|---|---|
| Receive notifications after an operation completes | Regular event |
| Intercept an operation and decide whether to allow it | Extension point event |
| Run a lightweight audit log or trigger a downstream workflow | Regular event |
| Enforce a policy (for example, block unauthorized file commits) | Extension point event |
For operations that support both types (such as file commit), the extension point event fires *before* the operation completes, while the regular event fires *after*. If you subscribe to both, your extension receives two notifications for the same operation.
Message structure
Each event message has an outer envelope and an inner data payload. The envelope fields are identical across all events. The data field contains the event-specific fields described in the sections below.
EventBridge message envelope
{
"datacontenttype": "application/json;charset=utf-8",
"data": {
"tenantId": 28378****10656,
"eventCode": "instance-status-changes"
},
"id": "539fd8f4-4ea1-4625-aa8b-6c906674****",
"source": "acs.dataworks",
"specversion": "1.0",
"subject": "",
"time": "2020-11-19T21:04:41+08:00",
"type": "dataworks:InstanceStatusChanges:InstanceStatusChanges",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX"
}
| Field | Type | Description |
|---|---|---|
data |
Object | Event-specific payload. Structure varies by event type. See the event sections below. |
id |
String | Unique event message ID. |
source |
String | Event source. Always acs.dataworks. |
type |
String | EventBridge event type. Use this value to filter messages in EventBridge. Example: dataworks:FileChange:CommitFile. |
time |
String | Timestamp when the event was generated. |
aliyunaccountid |
String | Alibaba Cloud account ID. |
aliyunpublishtime |
String | Timestamp when EventBridge received the event. |
aliyuneventbusname |
String | EventBridge event bus name. |
aliyunregionid |
String | Region where the event was received. |
To filter events in EventBridge, create an event pattern that matches the type field. For example, to subscribe to all file commit events:
{
"source": ["acs.dataworks"],
"type": ["dataworks:FileChange:CommitFile"]
}
To match all events from DataWorks, omit the type filter:
{
"source": ["acs.dataworks"]
}
Function Compute message envelope
When you configure an extension to use Function Compute, DataWorks sends the event in the following format:
{
"blockBusiness": true,
"eventCategoryType": "resources-download",
"eventType": "upload-data-to-table",
"extensionBizId": "job_6603***070",
"messageBody": {
"tenantId": 28378****10656,
"eventCode": "upload-data-to-table"
},
"messageId": "52d44ee7-b51f-4d4d-afeb-*******"
}
| Field | Type | Description |
|---|---|---|
messageId |
String | Unique event ID. |
messageBody |
Object | Event-specific payload. Identical to the data field in EventBridge messages. |
messageBody.tenantId |
Long | Tenant ID. Each Alibaba Cloud account maps to one tenant. Find this value in the user info panel in DataWorks Data Development. |
messageBody.eventCode |
String | Event code that identifies the event type. See the event tables below for all valid values. |
eventCategoryType |
String | Event category. |
eventType |
String | Event type. |
extensionBizId |
String | Extension checkpoint process ID. |
blockBusiness |
Boolean | Whether the event blocks the DataWorks operation. |
Workspace-level events
Workspace-level events are generated by modules within a workspace, such as node changes in Data Development or instance status changes in Operation Center.
Data Development
Events
Data Integration
Events
Operation Center
Changing the scheduling resource group or changing the node owner triggers a node-change-updated event.
Events
Security Center
Events
Data Quality
Tenant-level events
Tenant-level events are generated by tenant-scoped modules, such as workspace deletion from the console.
Console
Events
Upload and download
Events
| Event type | Triggering operation | Timing | Regular event | Extension point event | EventBridge event type (type) |
Event code (eventCode) |
|---|---|---|---|---|---|---|
| Data download and upload | Download data (file generation) | Before operation | - | Yes | dataworks:ResourcesDownload:DownloadResources |
download-resources |
| Data download and upload | Download data (file download) | Before operation | - | Yes | dataworks:ResourcesDownload:DownloadResourcesExecute |
download-resources-execute |
| Data download and upload | Upload data to table | Before operation | - | Yes | dataworks:ResourcesUpload:UploadDataToTable |
upload-data-to-table |
Message formats
Data download pre-event (file generation)
The data payload:
{
"eventCode": "download-resources",
"moduleType": "sqlx_query",
"operatorBaseId": "123936573******",
"operatorUid": "14931896037*******",
"fileName": "filename.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"
}
| Field | Type | Description |
|---|---|---|
moduleType |
String | Download source. entity_transfer: data catalog. develop_query: Data Development (DataStudio) SQL query. sqlx_query: SQL query. dw_excel: spreadsheet download. |
operatorBaseId |
String | Base ID of the user performing the download. |
operatorUid |
String | UID of the user performing the download. |
fileName |
String | Download file name. |
fileSize |
Long | Download file size in bytes. |
datasourceId |
String | Data source ID. |
datasourceName |
String | Data source name. |
queryDwProjectId |
String | Workspace ID. |
queryDwProjectName |
String | Workspace identifier. |
dataRowSize |
Long | Number of downloaded data rows. |
sqlText |
String | SQL statement used to query and download the data. |
eventCode |
String | Extension event code. |
Data download pre-event (file download)
This event contains the same fields as the file generation event, plus:
| Field | Type | Description |
|---|---|---|
ip |
String | IP address of the user who performed the download. |
Data upload pre-event
The data payload:
{
"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
}
| Field | Type | Description |
|---|---|---|
uploadSourceType |
String | Upload source. LOCAL: local file. OSS: OSS file. DW_EXCEL: DataWorks spreadsheet. HTTP: HTTP file. |
optTableType |
String | Target table mode. CREATE: upload to a new table. IMPORT: upload to an existing table. |
targetEngineType |
String | Target engine type. Valid values: MaxCompute, EMR Hive, Hologres. |
writeType |
String | Write mode. OVERWRITE: replace existing data. APPEND: append to existing data. |
conflictMode |
String | Primary key conflict resolution. IGNORE: skip conflicting rows. REPLACE: delete conflicting rows and insert new data (unspecified fields become NULL). UPDATE: overwrite only the specified fields in conflicting rows. |
operatorBaseId |
String | Base ID of the user performing the upload. |
operatorUid |
String | UID of the user performing the upload. |
datasourceId |
String | Target data source ID. |
datasourceName |
String | Target data source name. |
tableGuid |
String | Table GUID. Examples: MaxCompute: odps.maxcomputeProject.tableName. EMR Hive: emr_hive.emrClusterId.schema.tableName. Hologres: holo.hologresInstanceId.database. |
queryDwProjectId |
String | Workspace ID. |
queryDwProjectName |
String | Workspace name. |
fileSize |
Long | Upload file size in bytes. |
eventCode |
String | Extension event code. |
Appendix: enum value reference
schedulerType values
| Value | Constant | Description |
|---|---|---|
0 |
NORMAL | Regular scheduled task. Runs on the daily schedule. |
1 |
MANUAL | Manual task. Not included in daily scheduling. |
2 |
PAUSE | Frozen task. Included in daily scheduling but immediately set to failed. |
3 |
SKIP | Skip task. Included in daily scheduling but immediately set to succeeded. |
4 |
SKIP_UNCHOOSE | Unselected task in a temporary workflow. Immediately set to succeeded. |
5 |
SKIP_CYCLE | Weekly or monthly task not yet in its run cycle. Immediately set to succeeded. |
6 |
CONDITION_UNCHOOSE | Downstream node not selected by a branch (IF) node. Set to skip. |
7 |
REALTIME_DEPRECATED | Expired periodic instance generated in real time. Immediately set to succeeded. |
dagType values
| Value | Description |
|---|---|
0 |
Periodic scheduled task |
1 |
Manual task |
2 |
Smoke test |
3 |
Data backfill |
4 |
Temporary workflow |
5 |
Manual workflow |
Instance status values
| Value | Description |
|---|---|
1 |
Not running |
2 |
Waiting for scheduled time (dueTime or cycleTime) |
3 |
Waiting for resources |
4 |
Running |
5 |
Failed |
6 |
Succeeded |
7 |
Submitted to Data Quality for verification |
8 |
Checking branch conditions |
Cron expression reference
DataWorks cron expressions follow standard cron syntax with these constraints:
-
Minimum scheduling interval: 5 minutes
-
Earliest daily scheduled time: 00:05
| Schedule | Cron expression |
|---|---|
| Daily at 5:30 AM | 00 30 05 * * ? |
| Every hour at minute 15 | 00 15 * * * ? |
| Every 10 minutes | 00 00/10 * * * ? |
| 8:00 AM–5:00 PM, every 10 minutes | 00 00-59/10 8-17 * * * ? |
| 1st of each month at 00:20 | 00 20 00 1 * ? |
| Every 3 months starting January 1 at 00:10 | 00 10 00 1 1-12/3 ? |
| Every Tuesday and Friday at 00:05 | 00 05 00 * * 2,5 |