After you develop the code for a node, you can use different debugging methods, such as Run, Run with Parameters, and quick run, to debug the complete code or a code snippet. You can also view the debugging results. This topic provides an overview of the debugging procedure.

Prerequisites

Node development is complete. For more information, see Development logic.

Background information

You can debug a node or a workflow. For more information, see Debug a node or Debug a workflow. After the operation is complete, you can view debugging results by following the instructions that are described in View operating history and Use the ad hoc query feature. You can also perform related operations on query results.
Note When you debug a node or a workflow, you are not charged for scheduling resources but are charged for compute engine instances that you use. For information about the billing details of the compute engine instances, see the documentation about the billing rules of the related Alibaba Cloud services.

Debug a node

  1. Go to the DataStudio page. In the left-side Scheduled Workflow or Manually Triggered Workflows pane, double-click the node that you want to debug to go to the configuration tab of the node.
  2. Debug the node.
    On the configuration tab of the node, click the Run or Run with Parameters icon in the top toolbar to debug the complete code. You can also click the quick run icon to the left side of the code line of the node to debug a code snippet. The following table describes the debugging methods.
    Note If you have no permissions to access the data that you want to query when you run a node, you can follow the instructions that are described in Permission management for data in compute engine instances to understand permission management for data in compute engine instances in DataWorks.
    Debugging methodDescriptionScenario
    Run (Run)You can assign values to variables in code testing scenarios and specify a resource group for scheduling. The assigned values and the specified resource group are recorded and can be used in subsequent running operations.
    Note The first time you run a created node, the Parameters dialog box appears after you click the Run icon. You must assign constants to variables in the code in the dialog box. The assigned values are recorded by DataWorks. The next time you run the node, the configurations are used by default.
    If you need to frequently debug the node code, use this debugging method.
    Run with Parameters (Run with Parameters)Each time you run a node, you must assign constants to variables in the testing scenario and specify a resource group for scheduling. If you want to change the values assigned to the variables in the code or change the resource group for scheduling that is used for the node, use this debugging method.
    Quick run (Quick run)You can debug a code snippet in the code section of the configuration tab of a desired node. If you need to debug only a code snippet of a desired node, use this debugging method.
    Note This method can be used only to verify the correctness of code snippets. To debug complete code, use the Run or Run with Parameters method.

Debug a workflow

  1. Go to the DataStudio page. In the left-side Scheduled Workflow or Manually Triggered Workflows pane, double-click the workflow that you want to debug to go to the configuration tab of the workflow.
  2. Debug the workflow.
    Click the Run icon in the top toolbar of the configuration tab of the workflow. This way, nodes in the workflow are run in sequence based on dependencies.
    Note
    • If you define variables with the same name for nodes in a manually triggered workflow and values of the variables can be assigned in a unified manner, you can configure parameters for the workflow and assign values to the parameters on the configuration tab of the workflow. You can run a manually triggered workflow to view the value assignment results and the running details of nodes in the manually triggered workflow.
    • Workflow parameters can be configured only for specific types of nodes.
    • After you run a workflow, you can right-click a desired node on the configuration tab of the workflow and select View Log from the short-cut menu to view run logs of the node.

View operating history

You can go to the Operating history pane of the DataStudio page to view the records of all nodes that are run in the last three days within your current logon account.

After you run a node in DataStudio, the node is issued to the corresponding compute engine instance. Even if you accidentally close the node during the running of the node, the node is continuously run. You can go to the Operating history pane to view run logs of the node or stop the node.

Use the ad hoc query feature

You can use the ad hoc query feature if you need to only query data and related SQL code and test code or verify the correctness of code in the development environment.
Note If you have no permissions to access the data that you want to query when you run a node, you can follow the instructions that are described in Permission management for data in compute engine instances to understand permission management for data in compute engine instances in DataWorks.

Process query results

After the SQL code is run, you can perform various operations on query results. The following table describes the operations.
OperationDescriptionReferences
Analyze data.Synchronize query results to a workbook. This way, you can perform more analysis operations on the query results. Analyze data
Share data.Synchronize query results to a workbook and use the data sharing feature of the workbook to share query results with specific users. Share data
Download data.Download query results and save the query results as a workbook to your on-premises machine. By default, 10,000 data records are displayed. Download data
Note