DataWorks provides the code review feature. If the forcible code review feature is enabled, you must commit each node to a specific reviewer to review the node code. You can deploy the node only after the reviewer approves the node code.

Prerequisites

DataWorks Professional Edition or a more advanced edition is activated. If the administrator enables the forcible code review feature for a workspace in standard mode, you must commit your node for code review. If the forcible code review feature is disabled, you do not need to commit your node for code review. For a workspace in basic mode, you can choose whether to commit your node for code review.

Limits

The code review feature is available only for DataWorks workspaces in standard mode.

Enable the forcible code review feature

  1. Go to the DataStudio page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region where your workspace resides, find the workspace, and then click Data Analytics in the Actions column.
  2. On the DataStudio page, click the Setup icon in the lower-left corner.
  3. On the Setup page, click the Workspace Settings tab.
  4. In the Code review configuration section, turn on Force to review code and specify Baseline scopes for code review.
    Code review configuration section

Review code

  1. Go to the configuration tab of a node or workflow and click the Submit icon in the top toolbar.
  2. In the Commit Node dialog box, enter your comments in the Change description field and set the Specify code reviewer(Required) parameter.
    Commit Node
    Note
    • You cannot commit a combined node such as a do-while or for-each node for code review.
    • After you specify the code reviewer, the system generates a code review ticket.
    • If the forcible code review feature is disabled for the workspace, you do not need to commit your node for code review. Otherwise, you must commit your node for code review. You can deploy the node only after the specified reviewer approves the node code.
  3. Click OK.
  4. After you commit your node for code review, you can click the Submit icon in the upper-left corner and choose All Products > Code Review to go to the code review page. Code Review
  5. On the code review page, click the Review by Me tab, find the node, and then review the code of the node. You can also click the Submitted by Me tab and view the records of the code review requests that you have committed.
    You can perform the following operations on the code of a specific version as a code reviewer: Write a comment, Pass, Dot not pass, Abandoned, and Reopen. If the forcible code review feature is enabled, your review result determines whether the node can be deployed. If you perform the Pass operation on the code of a specific version, the node with this code version can be deployed. If you perform the Do not pass or Abandoned operation on the code of a specific version, the node with this code version cannot be deployed. You can compare the code of the committed version and that of the production version in the Review details section.
    Operation Description
    Write a comment Adds comments to the committed version.
    Pass Approves the code of the committed version.
    Do not pass Rejects the code of the committed version.
    Note If the forcible code review feature is disabled for the workspace, the node with this code version can still be deployed without code review. If the forcible code review feature is enabled for the workspace, the node with this code version cannot be deployed after you reject the version.
    Abandoned Abandons the code of the committed version.
    Reopen Reviews the code of the committed version again after you abandon it. After you abandon the code of a specific version, you can click Abandoned on the Review by Me tab, find the code of this version, and then click Reopen in the Actions column to review the code of this version again.
    The code review page consists of the Review by Me and Submitted by Me tabs.
    • Review by Me: You can view the records of all the review requests submitted to you. Review by Me tab
      Find a record and click View in the Actions column. On the page that appears, you can perform the following operations on the code of a specific version: Write a comment, Pass, Do not pass, Abandoned, and Reopen. Actions
    • Submitted by Me: You can view the records of all the review requests that you have submitted. Submitted by Me tab