Updated on 2024-04-03 GMT+08:00

Submitting a Version

Submitting a version depends on the version management function of DataArts Factory.

Version management traces script and job changes, and supports version comparison and rollback. The system retains 100 latest version records. In addition, version management can be used to distinguish the development state and production state.
  • Development state: Scripts or jobs have not been submitted and are used for debugging. In the development state, you can edit, save, and run scripts or jobs without affecting those being scheduled. In addition, when a job is being associated with a script or job dependency is being configured, the associated script or job will read the configuration in the development state.
  • Production state: Script or jobs have been submitted and are used for formal scheduling. In formal scheduling, the latest submitted versions of scripts or jobs will be used in scenarios such as script invocation, instance rerunning, and job dependency and patch data configuration.

Prerequisites

A script has been developed.

Submitting a Script Version

If you submit a version, the latest script in the development state will be saved and submitted and overwrite the previous script version.

  1. Log in to the DataArts Studio console. Locate an instance and click Access. On the displayed page, locate a workspace and click DataArts Factory.

    Figure 1 DataArts Factory

  2. In the left navigation pane of DataArts Factory, choose Data Development > Develop Script.
  3. In the script directory, double-click the developed script to access the script development page.
  4. Above the script editor, click Submit to submit a version. In the displayed dialog box, select the reviewer, enter the change description (a maximum of 128 characters allowed), and select the check box below. If you do not select this option, you cannot click OK. When submitting a version, you can click Compare Version to view the differences between the current version and the last version.

    Figure 2 Submitting a version

    You can enable review for submitted scripts on the Review Center page. For details, see Approval Settings.

    After the version is submitted, the admin of the workspace can review the script on the Pending Review tab page on the Review Center page. After the version is approved, it is submitted successfully.

    To revoke a submitted request, go to the Review Center page, click the My Applications tab, locate the request, and click Revoke in the Operation column. Then you can submit an application again.

    • The enterprise mode does not support the approval function.
    • If the current workspace has applications that have not been reviewed, the review function cannot be disabled.
    • The applications for submitting a created script, submitting a modified script, deleting a script, and importing scripts must be reviewed. An application for importing scripts must be reviewed only when the application is in the submitted state.

Version Rollback

After submitting the version, you can view it in the version list. (Currently, a maximum of 100 latest versions are saved.) Click Roll Back to roll back to any submitted version.

The rollback involves the following contents:
  • DLI: data connections, databases, resource queues, and script contents
  • DWS: data connections, databases, and script contents
  • HIVE: data connections, databases, resource queues, and script contents
  • SPARK: data connections, databases, and script contents
  • SHELL: host connections, parameters, interactive parameters, and script contents
  • RDS: data connections, databases, and script contents
  • PRESTO: data connections, modes, and script contents
  • PYTHON: host connections, parameters, interactive parameters, and script content
  • FLINK: script content

The procedure is as follows:

  1. Log in to the DataArts Studio console. Locate an instance and click Access. On the displayed page, locate a workspace and click DataArts Factory.
    Figure 3 DataArts Factory

  2. In the left navigation pane of DataArts Factory, choose Data Development > Develop Script.
  3. In the script directory list, double-click a script that you want to develop. The script development page is displayed.
  4. On the right of the page, click the Versions tab and view the version submission records. Select the version to be rolled back and click Roll Back.
    If the content in the development state is not submitted, the content will be overwritten after the rollback. In this case, you must submit the rollback version again to make it take effect. By default, the latest submitted version is used for scheduling.
    Figure 4 Rolling back a version

Version Comparison

You can compare the script contents of two different versions. If you select only one version, the system compares the script content of the selected version with that in the development state. If you select two versions, the system compares the script contents of two different versions.

The procedure is as follows:

  1. In the left navigation pane of DataArts Factory, choose Data Development > Develop Script.
  2. In the script directory list, double-click a script that you want to develop. The script development page is displayed.
  3. On the right of the page, click the Versions tab and view the version submission records. Select the versions to be compared and click Compare Version.
    Figure 5 Comparing versions
  4. A new page is displayed, showing the script content of different versions on the left and right separately. The differences between the two versions have been marked. You can use the and buttons in the upper right corner to go to the previous or next change.
    Figure 6 Version comparison details