DataWorks allows you to view the SQL code structure parsed from the code of a node. The code structure helps you troubleshoot issues and view and modify the code.
View the code structure of a node
Go to the DataStudio page.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.
Go to the configuration tab of a node.
You can search for a node in the Scheduled Workflow or Manually Triggered Workflows pane. After that, double-click the node to go to the configuration tab of the node.
View the code structure of the node.
In the right-side navigation pane, click Code Structure to view the code structure of the node in classic mode or outline mode.
Classic mode: The SQL code is run based on the organized SQL operators to obtain the final result. The classic mode displays the SQL operators involved in the structure and the associations between the operators.
You can view the type of an SQL operator by moving the pointer over this operator. The following list describes the common SQL operators used in the code structure.
Source table: the table to be queried.
Filter: the condition for filtering the partitions in the table to be queried.
Intermediate table (query view): the temporary table that stores the query results.
In this example, three intermediate tables are involved. Two intermediate tables displayed in the first section are used to store the query results from the corresponding source tables. The intermediate table displayed in the second section is used to store the joined query results. This intermediate table can be stored for three days and is automatically deleted after three days.
Join: the operation for joining the query results.
Outline mode: The outline mode displays the directory of the main SQL statements of the code.
You can view a specified code block by clicking the corresponding SQL operator in classic mode or the statement in outline mode. After that, you can modify the code as needed.