Use case: Trigger event checks in Operation Center

更新时间:
复制 MD 格式

After you register, publish, and enable an extension in DataWorks Open Platform, DataWorks sends event messages to your extension when workspace actions trigger extension point events. Operation Center supports node change events and backfill data events that you can use to run custom validation.

Prerequisites

Background

DataWorks sends notifications for extension point events and lets you create process checkpoints that run custom logic for specific operations. To use this feature, register your extension in the DataWorks console and enable it in Administration > Extensions. In the navigation pane of DataWorks Administration, click Extensions to open the extension management page. In the Extension Scope section, select Workspace as the type, choose the target workspace, and then turn on the Enable switch for your extension. In the Extension Data Authorization dialog box that appears, confirm the authorization details, such as the OpenAPI for a file change event: UpdateIDEEventResult. Select I have read and agree to the risks associated with the preceding data authorization. and then click Agree and Authorize.

Note
  • Only a workspace administrator can enable an extension in Administration > Extensions.

  • For more information about extensions, see Extension overview.

  • The preceding procedure is for a workspace-level extension. For more information, see Supported extension point events.

Overview

Operation Center sends messages for the following extension point events. You can register a local program as a DataWorks extension to receive these messages, process them with custom logic, and return the results by calling the UpdateWorkbenchEventResult API to implement process controls. The following extension points are supported:

Event

Description

node change event

  • Pre-undeployment check.

  • Pre-freeze check.

  • Pre-unfreeze check.

Note

In this context, a node refers to a task in the Scheduled Tasks list in the production Operation Center.

backfill data event

  • Backfill data for the current node of a scheduled task.

  • Backfill data for the current node and its downstream nodes of a scheduled task.

  • Backfill data in massive node mode.

  • Backfill data in advanced mode.

Note

In this context, a node refers to a task in the production Operation Center Scheduled Tasks list. When you perform the preceding operations on tasks on the Scheduled Tasks page in the production environment, extension validation is triggered. Performing these operations on scheduled tasks in the development environment does not trigger extension validation. Similarly, freezing or unfreezing an instance on the instance page does not trigger extension validation.

Supported extension points

Operation Center: Freeze and unfreeze a node

The following example demonstrates how to trigger an extension by freezing a node. In Operation Center, on the Scheduled Tasks page, right-click a target node, such as xc_demo_start, and select Suspend (Freeze) from the shortcut menu. You can also click the freeze icon in the toolbar. After the action is triggered, the Operation Check Details panel appears on the right, displaying the node name, operation type (Suspend/Freeze), and checkpoint status. You can click View Details or View Documentation to see validation results, click Recheck to re-run validation, or click Close to exit the panel.

Operation Center: Undeploy a node

In the Scheduled Tasks list, right-click a target task, such as test_select, and select Undeploy node from the shortcut menu. After you initiate the undeployment, a status icon and an Undeployment check in progress message appear in the task row. Click the status icon to open the Operation Check Details dialog box, which displays the task name, operation type (Undeploy), and checkpoint status. The Operation column provides links to View Details and View Documentation. Click Recheck to re-run validation, or click Close to dismiss the dialog box.

Operation Center: Backfill data

In the left-side navigation pane of Operation Center, select Scheduled Tasks. In the DAG on the right, right-click a target task node and select a backfill data option, such as for the current node, current and downstream nodes, in massive node mode, or in advanced mode. This action triggers a pre-check extension point event. After you submit the task, select Backfill Instances in the left-side navigation pane to view the check status. Click the check status to open the Operation Check Details dialog box, which displays the validation results, including checkpoint names and their statuses.

References