Updated on 2023-09-27 GMT+08:00

Script Development Process

The script development function provides the following capabilities:
  • Provides an online script editor for developing and debugging SQL, Python, and Shell scripts.
  • Supports script import and export.
  • Allows use of variables and functions.
  • Provides editing locks for collaborative development.
  • Supports script version management and generation of saved and submitted versions.

    If you save a script multiple times within a minute, only one version is recorded. If the intermediate data is important, you can click Save new version to save and add a version.

  • Allows you to copy long script names. Click , perform fuzzy search to query matched scripts, and click the copy button next to a long script name to copy it.
  • Allows you to right-click a script to quickly copy the script name and to quickly close an opened script tab page.
  • Supports global search. Click and perform a global search to find desired data. This function is only available for new instances.
  • Allows you to pin a workspace to the top.
  • Allows you to filter submitted and unsubmitted scripts. Unsubmitted scripts are marked in red.
  • Displays script parameters in a dialog box. Parameter values can be changed, but parameter names cannot. You can click Test Parameters to view (but not modify) the parameters referenced by the script and the environment variables configured in the environment. Parameters in the SQL statement can be sorted by name.
  • Supports configuration of the SQL editor style. Move the cursor to and click Style Configuration to configure the editor, icon display, annotation templates, and shortcut keys that can be used in the SQL script editor.
  • Allows you to go to the release page from the script development page in enterprise mode. Place the cursor over and click Release to go to the task release page.
  • Allows you to view tables of Hive SQL, DLI SQL, DWS SQL, RDS SQL, and Impala SQL scripts. You can expand a table name to view the column names, field types, and descriptions in the table.
  • Allows you to download and dump execution results of SQL scripts. A maximum of 1,000 results are displayed.
    • After executing a script, you can click Download on the Result tab page to download the script execution result. You can view the download record on the Download Center page.
    • After executing a script, you can click Dump on the Result tab page to dump the script execution result.

      Only the query statement execution results of SQL scripts can be dumped.

      1. When you click Dump, the Dump Result dialog box is displayed. You can set the dump result style.
        • Data Format: Select CSV or JSON.
        • In Advanced Settings, set Storage Path and other parameters as needed. You can also go to the Download Center page to set the default OBS path, which will be automatically set for Storage Path in the Dump Result dialog box. If you change the path in Advanced Settings, results will be dumped to the new path.
      2. After setting the dump parameters, click OK. Then the following message is displayed: "The system is processing the request. Go to the Download Center to view the result later."
The following figure shows the process of script development.
Figure 1 Script development process
  1. Create a script of the corresponding type. For details, see Creating a Script.
  2. Develop the script: Develop, debug, and execute the script online. For details, see Developing Scripts.
  3. Submit a version and unlock the script: After performing this step, the script can be scheduled by jobs and modified by other developers. For details, see Submitting a Version.
  4. (Optional) Manage the script: After the script development is complete, you can manage the script as required. For details, see (Optional) Managing Scripts.
  5. Release the script. For details, see Releasing a Script Task.