All Products
Search
Document Center

DataWorks:View the code structure

Last Updated:Mar 27, 2026

When debugging a complex SQL node, it can be hard to understand how SQL operators connect or to locate a specific statement in a long script. The Code Structure panel in DataStudio parses your SQL node's code into a visual flow diagram, so you can trace operator dependencies and jump directly to any code block for review or editing.

Prerequisites

Before you begin, ensure that you have:

  • A DataWorks workspace with at least one SQL node

  • Access to the DataWorks console

View the code structure

  1. Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Development and Governance > Data Development. Select the desired workspace from the drop-down list and click Go to Data Development.

  2. In the Scheduled Workflow or Manually Triggered Workflows pane, search for the target node and double-click it to open its configuration tab.

    Configuration tab of a node

  3. In the right-side navigation pane, click Code Structure. The panel opens in classic mode or outline mode. Select the mode based on your goal:

    Mode Best for
    Classic mode Tracing how SQL operators connect and understanding data flow between them
    Outline mode Jumping to a specific SQL statement in a large script

    Code Structure tab

Classic mode

Classic mode renders the SQL code as a directed graph of operators and their associations — similar to an execution plan view in other SQL tools. Each node in the graph represents a step in SQL execution.

To identify an operator's type, hover over it. The following operators appear in the graph:

  • Source table — the table being queried. 源表

  • Filter — the condition used to filter partitions in the source table. Filter

  • Intermediate table (query view) — a temporary table that stores intermediate query results. 中间表 For example, a SQL script that joins two source tables creates three intermediate tables: one for each source table's query results, and one for the joined result. Intermediate tables are retained for three days and deleted automatically after that.

  • Join — the operation that combines results from multiple tables. 关联

Outline mode

Outline mode displays a directory of the main SQL statements in your script — similar to the outline or symbol view in IDEs such as VS Code or JetBrains. Use it to get a high-level overview of the script's structure and navigate to any statement.

Navigate to and edit a code block

  • Classic mode: Click an SQL operator in the graph.

  • Outline mode: Click a statement in the directory.

The editor scrolls to and highlights the corresponding code block. Edit the code as needed.