DataArts Factory allows you to develop, debug, and run SQL scripts online. You can run developed scripts in jobs. For details, see Developing a Pipeline Job.
Property |
Description |
|---|---|
Data Connection |
Select a data connection. |
DLI Data Directory |
Select the DLI data directory.
|
Database |
Name of the database. If you select the default DLI data directory dli, select a DLI database and tables. If you select a metadata catalog that has been created in LakeFormation associated with DLI, select a LakeFormation database and tables. |
Resource Queue |
Enter a resource queue for executing a job. You can only enter rather than select a queue for Impala SQL and Hive SQL scripts. Selects a resource queue for executing a DLI job. Set this parameter when a DLI or SQL script is created. After you select a queue, you can click NOTE:
You can create a resource queue using either of the following methods:
NOTE:
The default resource queue default provided by DLI is only used for trial. It may be occupied by multiple users at a time. Therefore, it is possible that you fail to obtain the resource for related operations. If the execution takes a long time or fails, you are advised to try again during off-peak hours or use a self-built queue to run the job. In addition, the default queue does not support the insert, load, or cat commands. To set properties for submitting SQL jobs in the form of key/value, click NOTE:
NOTE:
When you run a DLI SQL script or test a DLI SQL single-task job in non-scheduling scenarios, the following parameters are enabled by default:
If you do not want to use these functions, you can set the values of the preceding parameters to false. |
select 1; select * from a where b="dsfa\;"; --example 1\;example 2.
To view the functions supported by this type of data connection, click System Functions on the right of the editor. You can double-click a function to the editor to use it.
Click Data Tables on the right of the editor to display all the tables in the current database or schema. You can select tables and columns and click Generate SQL Statement in the lower right corner to generate an SQL statement, which you need to manually format.
You can directly write script parameters in SQL statements. When debugging scripts, you can enter parameter values in the script editor. If the script is referenced by a job, you can set parameter values on the job development page. The parameter values can use EL expressions (see Expression Overview).
If a parameter in an SQL script involves a variable, the format of the variable must be the same as that set in Configuring Script Variables. If they are different, the variable cannot be identified.
In the following script example, str1 indicates the parameter name. It can contain only letters, digits, hyphens (-), underscores (_), greater-than signs (>), and less-than signs (<), and can contain a maximum of 16 characters. The parameter name must be unique.
select ${str1} from data;

and click Release.
Click
in the upper right corner to set environment variables for scripts. The following are some examples:
Set environment variables for a Hive SQL script:
--hiveconf hive.merge.mapfiles=true;
--hiveconf mapred.job.queue.name=queue1
Set environment variables for a Spark SQL script:
--num-executors 1
--executor-cores 4
--queue queue2
The former indicates the parameter name, and the latter indicates the parameter value.
After the script is executed, view the execution details on the MRS management plane.
Parameter |
Mandatory |
Description |
|---|---|---|
Script Name |
Yes |
Name of the script. The name contains a maximum of 128 characters, including only letters, numbers, hyphens (-), underscores (_), and periods (.). |
Owners |
No |
Owner of the script. By default, the creator of the script is the owner. |
Description |
No |
Descriptive information about the script. |
Select Directory |
Yes |
Directory to which the script belongs. The root directory is selected by default. |
If you open an unsaved script, you can restore its content from the local cache.
After the script is saved, a version is automatically generated and displayed in Versions. The version can be rolled back. 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.
Parameter |
Mandatory |
Description |
|---|---|---|
Data Format |
Yes |
Format of the data to be exported. CSV and JSON formats are supported. |
Resource Queue |
No |
DLI queue where the export operation is to be performed. Set this parameter when a DLI or SQL script is created. |
Compression Format |
No |
Format of compression. Set this parameter when a DLI or SQL script is created.
|
Storage Path |
Yes |
OBS path where the result file is stored. After selecting an OBS path, customize a folder. Then, the system will create it automatically for storing the result file. 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. |
Cover Type |
No |
If a folder that has the same name as your custom folder exists in the storage path, select a cover type. Set this parameter when a DLI or SQL script is created.
|
Export Column Name |
No |
Yes: Column names will be exported. No: Column names will not be exported. |
Character Set |
No |
|
Quotation Character |
No |
This parameter is available and can be set only when Data Format is csv. Quotation characters are used to identify the beginning and end of text fields when exporting job results, and are used to separate fields. Only one character can be set. The default value is double quotation marks ("). This is mainly used to handle data that contains spaces, special characters, or characters that are the same as the delimiter. For details about the examples of using quotation characters and escape characters, see Example of Using Quotation Characters and Escape Characters. |
Escape Character |
No |
This parameter is available and can be set only when Data Format is csv. If special characters, such as quotation marks, need to be included in the exported results, they can be represented using escape characters (backslash \). Only one character can be set. The default value is a backslash (\). Common scenarios for using escape characters are:
For details about the examples of using quotation characters and escape characters, see Example of Using Quotation Characters and Escape Characters. |
SQL Type |
Maximum Number of Results That Can Be Viewed Online |
Maximum Number/Size of Results That Can Be Downloaded |
Maximum Number/Size of Results That Can Be Dumped |
|---|---|---|---|
DLI |
10,000 |
1,000 records, less than 3MB |
Unlimited |
Hive |
1,000 |
1,000 records, less than 3MB |
10,000 records or 3 MB |
GaussDB(DWS) |
1,000 |
1,000 records, less than 3MB |
10,000 records or 3 MB |
Spark |
1,000 |
1,000 records, less than 3MB |
10,000 records or 3 MB |
RDS |
1,000 |
1,000 records, less than 3MB |
Not supported |
Presto |
1,000 |
The downloaded results are directly dumped to OBS. The number of results is unlimited. |
Unlimited |
ClickHouse |
1,000 |
1,000 records, less than 3MB |
10,000 records or 3 MB |
HetuEngine |
1,000 |
1,000 records, less than 3MB |
10,000 records or 3 MB |
Impala |
1,000 |
1,000 records, less than 3MB |
10,000 records or 3 MB |
Doris |
1,000 |
1,000 records, less than 3MB |
1,000 records or 3 MB |
You can leave Quotation Character and Escape Character empty.

If you leave them empty, the downloaded .csv file contains two rows in Excel.

If you specify both of them, for example, enter double quotation marks ("), the downloaded file is as follows.
