Creating a Script

DLF allows you to edit, debug, and run scripts online. You must add a script before developing it.

(Optional) Creating a Directory

If a directory exists, you do not need to create one.

  1. In the navigation tree on the left of the data development page, choose Data Development > Develop Script.
  2. In the directory list, right-click a directory and choose Create Directory from the shortcut menu.
  3. In the displayed dialog box, configure directory parameters. Table 1 describes the directory parameters.
    Table 1 Script directory parameters

    Parameter

    Description

    Directory Name

    Name of the script directory. Must consist of 1 to 32 characters and contain only letters, digits, underscores (_), and hyphens (-).

    Select Directory

    Parent directory of the script directory. The parent directory is the root directory by default.

  4. Click OK.

Creating a Script

Currently, you can create the following types of scripts in DLF:

  • DLI SQL
  • Hive SQL
  • DWS SQL
  • Spark SQL
  • Flink SQL
  • RDS SQL
  • Shell

Prerequisites

The quantity of scripts is less than the maximum quota (1,000).

Procedure

  1. In the navigation tree on the left of the data development page, choose Data Development > Develop Script.
  2. Create a script using either of the following methods:

    Method 1: On the right area of the page, click Create SQL Script/Create Shell Script.

    Figure 1 Creating an SQL script (method 1)
    Figure 2 Creating a shell script (method 1)

    Method 2: In the directory list, right-click a directory and choose Create Script from the shortcut menu.

    Figure 3 Creating a script (method 2)
  3. Go to the script development page. For details, see Developing an SQL Script and Developing a Shell Script.