The Code Structure tab displays the SQL code structure parsed from the code of a node. The code structure helps you easily view and modify the code.

  1. Log on to the DataWorks console. In the left-side navigation pane, click Workspaces. On the Workspaces page, find the target workspace and click Data Analytics in the Actions column.
  2. Double-click the ODPS SQL node whose code structure you want to view. For more information about how to create a node, see ODPS SQL node.
  3. On the node configuration tab that appears, click the Code Structure tab in the right-side navigation pane.
For example, an ODPS SQL node contains the following SQL statements:
INSERT OVERWRITE TABLE dw_user_info_all_d PARTITION (dt='${bdp.system.bizdate}')
SELECT COALESCE(a.uid, b.uid) AS uid
  , b.gender
  , b.age_range
  , b.zodiac
  , a.region
  , a.device
  , a.identity
  , a.method
  , a.url
  , a.referer
  , a.time
  FROM ods_log_info_d
  WHERE dt = ${bdp.system.bizdate}
) a
  FROM ods_user_info_d
  WHERE dt = ${bdp.system.bizdate}
) b
ON a.uid = b.uid;
Move the pointer over a circle to view the description.
  • Source table: the table to be queried.
  • Filter: finds the partitions in the table to be queried.
  • First intermediate table (view): the temporary table that stores the query results.
  • Join: joins the query results.
  • Second intermediate table (view): the temporary table that stores the results of the JOIN operation. The temporary table is deleted three days after its initial creation. This table can be stored for three days. After three days, this table is automatically deleted.
  • Destination table (insert): the destination table to which the query results are inserted by using an INSERT OVERWRITE statement.