Extensions

Updated at:

DataWorks Extensions is a plug-in that works with OpenAPI and OpenEvent to apply custom processing logic to user operations in DataWorks, such as interception and blocking. For example, you can develop an extension for task change control to enforce a custom task deployment process.

Limits

  • Only DataWorks Enterprise Edition is supported.

  • Supported regions: China (Beijing), China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), China (Chengdu), US (Silicon Valley), US (Virginia), Germany (Frankfurt), Japan (Tokyo), China (Hong Kong), Singapore.

Notes

  • Access control: Only Open Platform Administrators and Tenant Administrators, Alibaba Cloud account or RAM users with AliyunDataWorksFullAccess permission have read and write permissions for the developer backend. For more information, see Global module permission control and Product and console permission control details: RAM Policy.

  • Version period: If your DataWorks Enterprise Edition expires, all extensions become invalid and can no longer trigger event checks. If an extension is triggered to check an event and has not completed the check when DataWorks Enterprise Edition expires, the check is terminated and the result Check Passed is returned.

  • Limits: Currently, only some extension point events support deploying extensions through Function Compute.

Product capabilities

The Extensions module builds on the extension points provided by the DataWorks Open Platform. It works with the OpenAPI and OpenEvent modules to let you manage operations in DataWorks through custom processing logic, such as blocking specific operations.

Example scenarios for operation management with extensions:

  • Management of table or task naming conventions.

  • Management of duplicate data synchronization tasks.

  • Management of fees generated by tasks.

  • Management of dependencies between tasks.

    Note

    You can implement more scenarios by referring to the event types in Development reference: Event list and message format.

Custom process control: When an operation in DataWorks triggers an extension point event that is registered in an extension, the operation is paused until the extension returns its processing result.

Note

For example: In a workspace in standard mode, you can add an extension that checks a specific function to the original task development and publishing process. This transforms the task process from Development > Submit > Publish to Development > Pre-submission verification > Submit > Pre-publishing check > Publish. For an example, see Best practices: (Advanced feature application) Prohibit the use of the MAX_PT function.

Development process

You can develop and deploy extensions through self-built services or Function Compute to implement custom process control in DataWorks.

image
  • Configure the required settings in OpenEvent to push event messages: Choose a deployment method based on the extension point events your business needs to receive.

    • Develop and deploy extensions using self-built services: This method relies on EventBridge for message distribution. Make sure that you have specified the event bus for DataWorks messages and configured the routing service for messages in the event bus.

    • Develop and deploy extensions using Function Compute: DataWorks pushes messages to the specified Function Compute function by default. No event bus configuration in OpenEvent is required.

  • Develop and deploy a custom extension: Receive and parse event messages from DataWorks, implement custom logic, and return the results to DataWorks.

  • Register the extension: Specify which types of event messages the extension will receive and process.

  • Test the extension: Verify whether the extension meets expectations in a test workspace.

  • Submit and publish the extension: After verifying that the extension works as expected, submit it for platform review. Once approved, the extension is published for all workspaces to use.

    Note
    • Extension reviews are usually completed within T+3 working days. Please be patient.

    • DataWorks event messages are valid for three days. If the validity period is exceeded, the event messages are considered expired and are not processed by an extension.

Supported extension point events

The following table lists the extension point events that each DataWorks service supports.

Note

Application scope

System module

Extension point type

Extension point

OpenAPI for callback verification results

Workspace level

Data Development

File change events

  • Node

  • Resource

  • Function

Pre-event for file deletion

You can use the UpdateIDEEventResult API to call back the event processing results to DataWorks.

Pre-event for file committing

Pre-event for file publishing

Pre-event for code running

Table change events

Pre-event for table submission to production

Pre-event for table submission to development

Data Integration

Node change events

Enable task

You can use the CallbackExtension API to call back the event processing results to DataWorks.

Batch real-time task

Operation Center

Node change events

Pre-event for node unpublishing

You can use the UpdateWorkbenchEventResult API to call back the event processing results to DataWorks.

Pre-event for node freezing

Pre-event for node unfreezing

Data backfill operation event

Pre-event for data backfill

Instance change events

Pre-event for instance freezing

Pre-event for instance unfreezing

Pre-event for instance termination

Pre-event for instance rerunning

Pre-event for setting instance status to success

Security Center

Approval Center events

Pre-event for permission request creation

You can use the CallbackExtension API to call back the event processing results to DataWorks.

Data Quality

Data Quality verification events

Pre-event for batch creation of Data Quality rules

Pre-event for batch update of Data Quality rules

Pre-event for Data Quality rule update

Pre-event for batch deletion of Data Quality rules

Pre-event for Data Quality monitoring creation

Pre-event for Data Quality monitoring update

Pre-event for Data Quality monitoring cloning

Pre-event for Data Quality monitoring alert subscription creation

Pre-event for batch deletion of Data Quality monitoring

Pre-event for Data Quality monitoring alert subscription update

Pre-event for Data Quality monitoring alert subscription deletion

Tenant level

Management console

Workspace change events

Pre-event for workspace deletion

Upload and download

Data download events

Pre-event for data download (file generation)

Pre-event for data download (file download)

Pre-event for data upload

Appendix: Comparison of two deployment methods

Self-built service

Function Compute

Operation difficulty

The procedure is complex, involves server and application deployment, and is prone to network and O&M issues.

The procedure is simple. You can develop and deploy an extension with a single function.

Cost

-

This method incurs Function Compute fees. For more information, see Billing overview.

Supported events

This method supports various extension events. For more information, see Development reference: Event list and message format.

The Function Compute-based deployment method supports only the pre-event for data download, pre-event for data upload, pre-event for asset publishing, and pre-event for asset unpublishing extension point events.