DataWorks provides the code review feature. If the forcible code review feature is
enabled, you must submit each node for the specified 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. For a workspace
in standard mode, if the administrator enables the forcible code review feature, you
must submit your node for code review. If the forcible code review feature is disabled,
you do not need to submit your node for code review. For a workspace in basic mode,
you can choose whether to submit your node for code review.
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 Forcible Code Review and set the Specify Baseline Scope for Forcible Code Review parameter.
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 submit 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 in the workspace, you do not need
to submit your node for code review. Otherwise, you must submit your node for code
review. You can deploy the node only after the specified reviewer approves the node
code.
- Click OK.
- Go to the code review page as the specified reviewer. After you submit a code review
request, you and the specified reviewer will receive an email notification.
Note For a RAM user, you must specify an email address in the Resource Access Management
(RAM) console so that you can receive an email notification.
You can also go to the code review page by using the following method: On the DataStudio
page, click the

icon in the upper-left corner and choose .
- 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 submitted.
As a reviewer, you can perform the following operations on the code version:
Write a comment,
Through,
Do 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
Through operation on the code version, the node can be deployed. If you perform the
Do not pass or
Abandoned operation on the code version, the node cannot be deployed. You can compare the code
of the submitted version and that of the production version in the Review details
section.
Action |
Description |
Write a comment |
Comment on the submitted version. |
Through |
Approve the submitted version. |
Do not pass |
Reject the submitted version.
Note If the forcible code review feature is disabled in the workspace, the node with this
code version can still be deployed after you reject the version. If the forcible code
review feature is enabled in the workspace, the node with this code version cannot
be deployed after you reject the version.
|
Abandoned |
Abandon the submitted version. |
Reopen |
Review the code of the submitted version again after you abandon it. After you abandon
a code version, you can click on the Review by Me tab, find the version, and then click Reopen in the Actions column to review the
code of the 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 that have been 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 version: Write a comment, Through, Do not pass, Abandoned, and Reopen.
- Submitted by Me: You can view the records of all the review requests that you have submitted.