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
- Go to the DataStudio page.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- In the top navigation bar, select the region where your workspace resides, find the
workspace, and then click Data Analytics in the Actions column.
- On the DataStudio page, click the
icon in the lower-left corner.
- On the Setup page, click the Workspace Settings tab.
- In the Code review configuration section, turn on Force to review code and specify Baseline scopes for code review.
Review code
- Go to the configuration tab of a node or workflow and click the
icon in the top toolbar.
- In the Commit Node dialog box, enter your comments in the Change description field and set the Specify code reviewer(Required) parameter.

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.
- Click OK.
- After you commit your node for code review, you can click the
icon in the upper-left corner and choose to go to the code review page. 
- 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.

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.

- Submitted by Me: You can view the records of all the review requests that you have submitted.
