To undeploy a node, you need to delete the node from the development environment, and deploy the deletion operation to the scheduling system in the production environment. After the node is undeployed, it can no longer be scheduled. This topic describes how to undeploy an auto triggered node in a workspace in standard mode and how to restore the undeployed node. This topic also describes the impacts of node undeployment on instances generated for the node.
Usage notes
To ensure that descendant nodes of a node can be run as expected, DataWorks allows you to undeploy only nodes that do not have descendant nodes. If you undeploy a node that has descendant nodes, an error occurs. For more information, see Error: The node fails to be deleted or undeployed because the node has descendant nodes.. Before you undeploy a node, you must check its scheduling dependencies. For information about how to view scheduling dependencies between nodes, see View the DAG of an auto triggered node.
By default, if you undeploy a node on the Cycle Task page in Operation Center in the production environment, the node can be modified in the development environment and is not moved to the recycle bin. You can search for the node on the DataStudio page by node name.
Undeploy an auto triggered node
The following figure shows the procedure for undeploying an auto triggered node.
Step 1: Delete nodes from the development environment
Delete nodes on the DataStudio page.
Operation | Description and illustration |
Delete a single node | To delete a single node, you can find the node in the workflow to which the node belongs in the Scheduled Workflow pane, right-click the node name, and then select Delete to delete the node. You can also find the node on the configuration tab of the workflow to which the node belongs, right-click the node name, and then select Delete Node to delete the node. After you delete the node, you must click the icon to commit the current workflow. |
Delete multiple nodes at a time | You can use the Perform operations on multiple DataWorks objects at a time feature to delete multiple nodes at a time. |
Delete a node by using a node group | You can use multiple nodes that you want to delete to form a node group, and delete the node group. You can also delete a specified node from an existing node group.After you delete the node, you must click the icon to commit the current workflow. |
Step 2: Deploy the deletion operation to the production environment
By default, after you delete a node on the DataStudio page in the development environment, DataWorks generates a to-be-deployed node deletion record on the Create Deploy Task page. Users that are assigned the Workspace Manager or O&M role can deploy the record to the production environment. After the record is deployed, the node in the production environment can be undeployed. The deployment of the deletion operation is subject to the related process management. You must make sure that the node deletion operation is successfully deployed. For information about the procedure for deploying a node and permission management for node deployment, see Deploy nodes.
Step 3: Check whether the node in the production environment is undeployed
On the Cycle Task page in Operation Center, check whether the node exists. If the node does not exist, the node is undeployed.
Impacts of node undeployment on instances generated for the node
Instances that are generated but not run
If you undeploy a node, instances that are generated for the node but are not run will dry run. The system does not actually run the instances and directly prompts that the instances are successfully run. If you use a resource group whose billing method is pay-as-you-go to schedule the node, you are not charged for scheduling the dry-run instances.
Instances that are running
If you undeploy a node, instances that are running will continue to run.
DataWorks does not allow you to manually delete an instance. DataWorks deletes the instance about 30 days after the instance expires.
If you do not need to run an auto triggered node on a specific day, you can freeze the generated instance that is scheduled to run on that day. If you do not need to run an auto triggered node for a long period of time, you can freeze the node. For more information, see Perform basic O&M operations on auto triggered nodes.
Restore an undeployed node
In the Recycle Bin pane of the DataStudio page, you can restore about 100 deleted nodes, and commit and deploy the nodes again.
If you restore a node that is deleted, a new ID is generated for the node.
You can restore only objects such as nodes, resources, and functions that are deleted from both the development and production environments. If you restore an object that is deleted only from the development environment, the Error: The ${filename} file is not deployed to the production environment or the node deletion operation is being deployed on the Deploy page error is reported.
FAQ
Error: The ${filename} file is not deployed to the production environment or the node deletion operation is being deployed on the Deploy page.
- Cause: The recycle bin in the DataWorks console allows you to restore only objects such as nodes, resources, and functions that are deleted from both the development and production environments. If a node is deleted only from the development environment and the deletion operation is not deployed to the production environment, the error is reported.
- Solution: Go to the Deploy page to cancel the node deletion operation, and then restore the data development file.
Error: The node fails to be deleted or undeployed because the node has descendant nodes.
- Cause: To ensure that descendant nodes of a node can be normally run, DataWorks allows you to undeploy only nodes that do not have descendant nodes in both the development and production environments. Note If you undeploy a node that has descendant nodes, exceptions may occur on the descendant nodes. We recommend that you contact the owner of each descendant node before you undeploy the current node.
- Solution:
- Check whether a node that you want to undeploy has descendant nodes: You can go to the Cycle Task pages in Operation Center in the development and production environments to check whether the node that you want to undeploy has descendant nodes. For more information, see View the DAG of an auto triggered node.
- Remove scheduling dependencies between the current node and its descendant nodes:
- Go to the Properties tab of the descendant nodes and remove the scheduling dependencies of the descendant nodes on the node that you want to undeploy. For more information, see Delete or change scheduling dependencies between nodes.
- Commit the descendant nodes to remove the scheduling dependencies of the descendant nodes on the node that you want to undeploy in the development environment.
- Deploy the descendant nodes to remove the scheduling dependencies of the descendant nodes on the node that you want to undeploy in the production environment.
- Continue to undeploy the node. For more information, see Undeploy nodes.