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

Creating a Script

DataArts Factory allows you to create, edit, debug, and run SQL, Python, and Shell scripts. Before developing a script, you must create one.

Prerequisites

You have completed operations in Creating a Data Connection and Creating a Database.

Procedure

Creating a Directory (If a directory already exists, you do not need to create one.)

  1. Log in to the DataArts Studio console by following the instructions in Accessing the DataArts Studio Instance Console.
  2. On the DataArts Studio console, locate a workspace and click DataArts Factory.
  3. In the left navigation pane of DataArts Factory, choose Data Development > Develop Script.
  4. In the script directory list, right-click a directory and choose Create Directory from the shortcut menu.
  5. 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. The name must contain 1 to 64 characters, including only letters, numbers, underscores (_), and hyphens (-).

    Select Directory

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

  6. Click OK.

Creating a Script

  1. In the script directory list, right-click a directory and select Create Script type Script from the shortcut menu.
  2. Go to the script development page. For details, see Developing an SQL Script, Developing a Shell Script, and Developing a Python Script.

    A maximum of five temporary scripts of the same type can be created. If you close a temporary script without saving it and create a script of the same type, the closed temporary script will be opened again.