All Products
Search
Document Center

DataWorks:Trigger event checking during data development

Last Updated:Feb 06, 2024

After you register, publish, and enable an extension in DataWorks Open Platform, the extension takes effect. When you perform an operation that triggers an extension point event on a service page of a workspace for which an extension takes effect, DataWorks sends an event message to your extension. Then, the extension checks the extension point event. You can view the result returned by the extension. This topic describes the extension point events that are supported by DataStudio and how to use extension points to trigger an extension to check events.

Prerequisites

Background information

  • Method to enable an extension

    You can view extensions on the Extension page and determine whether to enable an extension in the current workspace.扩展程序

  • Extension point events supported by DataStudio

    The extension point events that are supported by DataStudio include the pre-event for file deployment, pre-event for file committing, and pre-event for table committing. For information about the definitions of extension point events and the list of extension point events, see Supported extension point events.

  • After an extension point event is triggered, DataWorks sends an event message to an extension. Then, the extension is triggered to check the extension point event and return a result. For information about how an extension point event is triggered, see Supported extension point events.

Limits

For scenarios in which you enable an extension to respond to messages related to extension point events generated during data development, take note of the following limits in terms of message notification and responding:

  • If you enable a built-in extension, the extension takes effect only for ODPS SQL nodes.

    Built-in extensions check the processing logic only for ODPS SQL nodes. For ODPS SQL nodes, if operations that trigger extension point events are performed, DataWorks interrupts the operations, sends messages to extensions, waits for extensions to check the processing logic and return check results, and then processes the operations based on the check results. For other types of nodes, if operations that trigger extension point events are performed, DataWorks interrupts the operations, but built-in extensions return success without checking the processing logic.

  • The pre-event for table deployment and pre-event for table committing can be triggered and checked only when MaxCompute tables are committed and deployed.

  • If node groups, such as Platform for AI nodes, do-while nodes, and for-each nodes, trigger extension checks, you must wait for all inner nodes of the node groups to pass the checks before you can perform subsequent operations.

Features

DataStudio allows your local services to receive messages when events related to the following extension points are generated. In addition, you can register a local program as a DataWorks extension and use the extension to receive messages related to extension point events. The extension can process extension point events based on your custom logic and send the check result to the platform by calling the UpdateIDEEventResult operation. This helps achieve process control in DataWorks. DataWorks supports the following extension points:

  • Extension points for operations on files, such as file execution, file committing, file deployment, and file deletion

  • Extension points for operations on tables, such as table committing and table deployment

    Note

    The extension point events for tables can be triggered and checked only when specific operations are performed on MaxCompute tables.

Supported extension point events

DataWorks sends messages to extensions and waits for extensions to check and respond to the messages when events related to the following extension points are triggered during data development:

Execute a file in DataStudio代码运行

Commit a file in DataStudio文件提交

Deploy a file in DataStudio文件发布

Delete a file in DataStudio文件删除

Commit a table in DataStudio表提交

Deploy a table in DataStudio表发布

References