Undeploy a node

更新时间:
复制 MD 格式

Undeploying a node removes it from the development environment and deploys the deletion to the production scheduling system. After a node is undeployed, it can no longer be scheduled. This topic describes how to undeploy and restore a scheduled task in a standard workspace and explains how DataWorks handles existing and running instances after the node is undeployed.

Usage notes

  • To ensure that downstream tasks run as expected, DataWorks allows you to undeploy only nodes that have no downstream dependencies. Attempting to undeploy a node with dependencies results in an error. For more information, see Error: The node has child nodes, causing the task deletion or undeployment to fail. To view the dependencies of a node, see Manage scheduled tasks.

  • A node that is undeployed from the Periodic tasks page in the production environment's Operation Center reverts to an editable state in the development environment by default and is not moved to the recycle bin. You can find the node by searching for its name in DataStudio.

Undeploy a node

The following figure shows the procedure for undeploying a scheduled task.任务下线流程

Step 1: Delete the node in development

Delete the node in DataStudio.

Actions

Description

Delete a single node

You can delete a specific node from the workflow directory or the workflow panel. After deletion, commit the current workflow by clicking the 提交 icon. In DataStudio, you can delete a single node in two ways. Method 1: In the workflow directory on the left, right-click the target node and select Delete. Method 2: On the workflow DAG panel on the right, right-click the target node and select Delete Node.

Delete nodes in batches

You can use the batch operation feature to delete multiple nodes at once. Click the Batch Operation icon in the toolbar to go to the Batch Operation - DataStudio page. On the Node tab, select the nodes that you want to delete from the list, then click More in the bottom action bar and select Delete.

Delete nodes by using a node group

You can create a node group by selecting multiple nodes and then delete specific nodes from it. You can also delete nodes from an existing node group. After deletion, commit the current workflow by clicking the 提交 icon. On the canvas toolbar, click the selection tool to select the target node group, right-click it, and select Delete Node Group from the context menu.

Step 2: Deploy the deletion to production

After you delete a node in DataStudio, DataWorks by default creates a pending undeployment record on the Deployment > Create Deploy Task page. A user with Workspace Administrator or O&M permissions must deploy this record to the production environment. On this page, select the target undeployment record and click Deploy Selected Items. The node in the production environment is undeployed only after the deployment is successful. The deployment process may be subject to certain workflow controls, so ensure that the operation completes successfully. For more information about the deployment process and permission controls, see Deployment.

Step 3: Confirm the undeployment

Go to the Operation Center > Periodic tasks page. If the node no longer appears in the list, the node has been successfully undeployed.

Impact of undeployment on existing instances

  • Instances that have not run

    During the undeployment process, instances that have not started running are skipped. Their status is immediately set to Succeeded, but the task itself does not run. In pay-as-you-go billing, you are not charged a scheduling fee for these skipped instances.

  • Running instances

    Instances that are already running when the undeployment occurs will continue to execute normally.

Note
  • You cannot manually delete instances. They are automatically deleted after a retention period of approximately 30 days.

  • If a scheduled task does not need to run on a specific day, you can freeze the instances scheduled for that day. If a task does not need to run for an extended period, you can freeze the scheduled task itself. For more information, see Basic O&M operations for scheduled tasks.

Restore a node

You can restore the 100 most recently deleted nodes from the recycle bin in DataStudio and then commit and deploy them again.

Note

FAQ

Error: Please first deploy the file ${filename} to the production environment or cancel the deployment in the Deployment center

  • Cause: You can only restore items, such as nodes, resources, or functions, from the DataWorks Recycle Bin if they have been deleted from both the development environment and the production environment. This error occurs if a task is deleted from the development environment, but that deletion has not yet been deployed to the production environment. In this state, the task is not fully undeployed and cannot be restored.

  • Solution: Go to the Deployment Center and cancel the deployment of the current task. You can then restore the file in DataStudio.

Error: The node has child nodes, causing the task deletion or undeployment to fail

  • Cause: To ensure pipeline stability, in DataWorks you can undeploy a task only if it has no downstream dependencies in either the development or production environments.

    Note

    Undeploying a node may cause dependent tasks to fail. Before you proceed, coordinate with the owners of all tasks that depend on the node.

  • Solution:

    1. Identify all downstream dependencies by checking the Operation Center > Auto Triggered Nodes page in both the development and production environments. For more information, see Manage auto-triggered tasks.

    2. Remove the downstream dependencies:

      1. For each downstream task, open its Properties page and remove the dependency on the node you want to undeploy. For more information, see Delete or change node dependencies.

      2. Commit the downstream task to remove the dependency in the development environment.

      3. Deploy the downstream task to remove the dependency in the production environment.

      4. Undeploy the original task. For more information, see Undeploy a task.