Files
doc-exports/docs/dataartsstudio/umn/dataartsstudio_01_0424.html
chenxiaoxiong f9e2808b7c DataArts UMN 20250810 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
2025-09-02 10:44:13 +00:00

363 lines
70 KiB
HTML

<a name="dataartsstudio_01_0424"></a><a name="dataartsstudio_01_0424"></a>
<h1 class="topictitle1">Developing an SQL Script</h1>
<div id="body8662426"><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p62698144406">DataArts Factory allows you to develop, debug, and run SQL scripts online. You can run developed scripts in <span id="dataartsstudio_01_0424__en-us_topic_0104967365_text96193615113">job</span>s. For details, see <a href="dataartsstudio_01_0435.html">Developing a Pipeline Job</a>.</p>
<div class="p" id="dataartsstudio_01_0424__en-us_topic_0104967364_p1791358191412">DataArts Factory supports the following types of SQL scripts. The SQL syntax varies depending on the data source. Before developing an SQL statement, learn about the syntax of the corresponding data source.<ul id="dataartsstudio_01_0424__en-us_topic_0104967364_ul1661522972111"><li id="dataartsstudio_01_0424__en-us_topic_0104967364_li1161511292214">DLI SQL scripts: For details, see "Spark SQL Syntax" in <em id="dataartsstudio_01_0424__i549312491605">Spark SQL Syntax Reference</em> of the DLI service.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967364_li36157294217">Hive SQL scripts: For details, see "Hive SQL" in<em id="dataartsstudio_01_0424__i9735112783717"> MapReduce Service (MRS) Usage Guide</em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967364_li1061582910217">DWS SQL scripts: For details, see the syntax descriptions in <em id="dataartsstudio_01_0424__i12826391375">Data Warehouse Service (DWS) Usage Guide</em><em id="dataartsstudio_01_0424__i4821839103716"></em>.</li><li id="dataartsstudio_01_0424__li243219743613">Spark SQL scripts: For details, see "Spark2x Basic Principles" in <em id="dataartsstudio_01_0424__i2774154713717">MapReduce Service (MRS) Usage Guide</em>.</li><li id="dataartsstudio_01_0424__li395351418443">ClickHouse SQL scripts: For details, see "Common ClickHouse SQL Syntax" in <em id="dataartsstudio_01_0424__i16735346389">MapReduce Service (MRS) Usage Guide</em><em id="dataartsstudio_01_0424__i9736184183811"></em>.</li><li id="dataartsstudio_01_0424__li6237159113712">Impala SQL scripts: For details, see "Impala" in <em id="dataartsstudio_01_0424__i4199121512382">MapReduce Service (MRS) Usage Guide</em><em id="dataartsstudio_01_0424__i19199161563817"></em>.</li><li id="dataartsstudio_01_0424__li92651541154415">Flink SQL scripts: For details, see "Stream SQL Join" in <em id="dataartsstudio_01_0424__i746802653813">MapReduce Service (MRS) Usage Guide</em><em id="dataartsstudio_01_0424__i446952683820"></em>.</li><li id="dataartsstudio_01_0424__li746524319446">RDS SQL scripts: For details, see "Syntax" in <em id="dataartsstudio_01_0424__i1661155572">Relational Database Service User Guide</em>.</li><li id="dataartsstudio_01_0424__li12792021141317">Presto SQL scripts: For details, see "Presto" in <em id="dataartsstudio_01_0424__i1473345214400">MapReduce Service Overview</em>.</li><li id="dataartsstudio_01_0424__li4761585212">Spark Python scripts: For details, see "Configuring the Spark Python3 Sample Project" in <em id="dataartsstudio_01_0424__i157591913403">Developer Guide</em> in <em id="dataartsstudio_01_0424__i10918123124015">MapReduce Service (MRS) Usage Guide</em>.</li><li id="dataartsstudio_01_0424__li12521555174318">Doris SQL scripts: For details, see "Doris Basic Principles" in <em id="dataartsstudio_01_0424__i1540514284413">MapReduce Service (MRS) Usage Guide</em><em id="dataartsstudio_01_0424__i8406104224411"></em>.</li></ul>
</div>
<div class="section" id="dataartsstudio_01_0424__en-us_topic_0104967365_section536330414847"><h4 class="sectiontitle">Prerequisites</h4><ul id="dataartsstudio_01_0424__en-us_topic_0104967365_ul19472859172929"><li id="dataartsstudio_01_0424__en-us_topic_0104967365_li137811513359">A corresponding cloud service has been enabled and a database has been created in the cloud service.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967365_li191787178342">A data connection that matches the data connection type of the created script. For details, see <a href="dataartsstudio_01_0009.html">Configuring DataArts Studio Data Connection Parameters</a>. The Flink SQL script does not involve this operation.</li><li id="dataartsstudio_01_0424__li1933013935818">You have locked the script. Otherwise, you must click <strong id="dataartsstudio_01_0424__b7781145941616">Lock</strong> so that you can develop the script. A script you create or import is locked by you by default. For details, see the <a href="dataartsstudio_01_0912.html">lock function</a>.</li></ul>
</div>
<div class="section" id="dataartsstudio_01_0424__en-us_topic_0104967365_section3093294014851"><h4 class="sectiontitle">Procedure</h4><ol id="dataartsstudio_01_0424__ol1675913016540"><li id="dataartsstudio_01_0424__li2848154165110">Log in to the <span id="dataartsstudio_01_0424__en-us_topic_0000001987511677_en-us_topic_0000001127311125_text5574448155719">DataArts Studio</span> console by following the instructions in <a href="dataartsstudio_01_0001.html">Accessing the DataArts Studio Instance Console</a>.</li><li id="dataartsstudio_01_0424__li5466915163">On the <span id="dataartsstudio_01_0424__en-us_topic_0181092879_text185611381448">DataArts Studio</span> console, locate a workspace and click <strong id="dataartsstudio_01_0424__en-us_topic_0181092879_b65382814249">DataArts Factory</strong>.</li><li id="dataartsstudio_01_0424__li164661516160">In the left navigation pane of DataArts Factory, choose <span class="menucascade" id="dataartsstudio_01_0424__en-us_topic_0181092879_en-us_topic_0104967364_menucascade1889024114211"><b><span class="uicontrol" id="dataartsstudio_01_0424__en-us_topic_0181092879_en-us_topic_0104967364_uicontrol88905411627"><span id="dataartsstudio_01_0424__en-us_topic_0181092879_en-us_topic_0104967364_text6890114118213">Data Development</span></span></b> &gt; <b><span class="uicontrol" id="dataartsstudio_01_0424__en-us_topic_0181092879_en-us_topic_0104967364_uicontrol1189017411422"><span id="dataartsstudio_01_0424__en-us_topic_0181092879_en-us_topic_0104967364_text18901411529">Develop Script</span></span></b></span>.</li><li id="dataartsstudio_01_0424__li15759180145420">In the script directory, double-click a script to access the script development page.</li><li id="dataartsstudio_01_0424__li1776015010549">In the upper part of the editor, select script properties. <a href="#dataartsstudio_01_0424__en-us_topic_0104967365_table18459183312499">Table 1</a> describes the script properties. Skip this step when creating a Flink SQL script.
<div class="tablenoborder"><a name="dataartsstudio_01_0424__en-us_topic_0104967365_table18459183312499"></a><a name="en-us_topic_0104967365_table18459183312499"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0424__en-us_topic_0104967365_table18459183312499" frame="border" border="1" rules="all"><caption><b>Table 1 </b>SQL script properties</caption><thead align="left"><tr id="dataartsstudio_01_0424__en-us_topic_0104967365_row144598332490"><th align="left" class="cellrowborder" valign="top" width="20.18%" id="mcps1.3.4.2.5.2.2.3.1.1"><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p3475163304919">Property</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="79.82000000000001%" id="mcps1.3.4.2.5.2.2.3.1.2"><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p447543364917">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0424__en-us_topic_0104967365_row0475533134913"><td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.5.2.2.3.1.1 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p18475123313491">Data Connection</p>
</td>
<td class="cellrowborder" valign="top" width="79.82000000000001%" headers="mcps1.3.4.2.5.2.2.3.1.2 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p8475153311497">Select a data connection.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row199118375714"><td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.5.2.2.3.1.1 "><p id="dataartsstudio_01_0424__p5918305719">DLI Data Directory</p>
</td>
<td class="cellrowborder" valign="top" width="79.82000000000001%" headers="mcps1.3.4.2.5.2.2.3.1.2 "><p id="dataartsstudio_01_0424__p4779172318213">Select the DLI data directory.</p>
<ul id="dataartsstudio_01_0424__ul153194821910"><li id="dataartsstudio_01_0424__li15319168191912">Default DLI data directory <strong id="dataartsstudio_01_0424__b1074819132291">dli</strong></li><li id="dataartsstudio_01_0424__li831958151919">Metadata catalog that has been created in LakeFormation associated with DLI.</li></ul>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row86214269514"><td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.5.2.2.3.1.1 "><p id="dataartsstudio_01_0424__p797710514510">Database</p>
</td>
<td class="cellrowborder" valign="top" width="79.82000000000001%" headers="mcps1.3.4.2.5.2.2.3.1.2 "><p id="dataartsstudio_01_0424__p109771551205120">Name of the database.</p>
<p id="dataartsstudio_01_0424__p6964191402417">If you select the default DLI data directory <strong id="dataartsstudio_01_0424__b706369676291">dli</strong>, select a DLI database and tables.</p>
<p id="dataartsstudio_01_0424__p1892362811241">If you select a metadata catalog that has been created in LakeFormation associated with DLI, select a LakeFormation database and tables.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__en-us_topic_0104967365_row1649013331499"><td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.5.2.2.3.1.1 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p194901533194919">Resource Queue</p>
</td>
<td class="cellrowborder" valign="top" width="79.82000000000001%" headers="mcps1.3.4.2.5.2.2.3.1.2 "><p id="dataartsstudio_01_0424__p1725874544018">Enter a resource queue for executing a job.</p>
<p id="dataartsstudio_01_0424__p1341744354114">You can only enter rather than select a queue for Impala SQL and Hive SQL scripts.</p>
<p id="dataartsstudio_01_0424__en-us_topic_0104967365_p9490233194919">Selects a resource queue for executing a <span id="dataartsstudio_01_0424__en-us_topic_0104967365_text134901933194914">DLI</span> job. Set this parameter when a DLI or SQL script is created. After you select a queue, you can click <span><img id="dataartsstudio_01_0424__image1525074216261" src="en-us_image_0000002269118113.png"></span> to view the queue performance, including the number of running jobs and CU usage, in the last 24 hours.</p>
<div class="note" id="dataartsstudio_01_0424__note1951343192915"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="dataartsstudio_01_0424__ul130611814341"><li id="dataartsstudio_01_0424__li103061918203413">If you select the default queue, a message is displayed, indicating that the performance of the default queue cannot be displayed.</li><li id="dataartsstudio_01_0424__li203069182342">If no queue is selected, <span><img id="dataartsstudio_01_0424__image808452040291" src="en-us_image_0000002269118113.png"></span> is unavailable.</li></ul>
</div></div>
<div class="p" id="dataartsstudio_01_0424__en-us_topic_0104967365_p4632865112">You can create a resource queue using either of the following methods:<ul id="dataartsstudio_01_0424__en-us_topic_0104967365_en-us_topic_0099822521_ul46080727105259"><li id="dataartsstudio_01_0424__en-us_topic_0104967365_en-us_topic_0099822521_li12073360105259">Click <span><img id="dataartsstudio_01_0424__image44923992111" src="en-us_image_0000002269198213.png"></span>. The <span class="wintitle" id="dataartsstudio_01_0424__wintitle1649216919212"><b>Queue Management</b></span> page of <span id="dataartsstudio_01_0424__text749314918215">DLI</span> is displayed.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967365_en-us_topic_0099822521_li24857298105259">Go to the <span id="dataartsstudio_01_0424__en-us_topic_0104967365_text1960817174515">DLI</span> console.</li></ul>
</div>
<div class="note" id="dataartsstudio_01_0424__en-us_topic_0104967365_note24901033174917"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p144901133144918">The default resource queue <span class="parmvalue" id="dataartsstudio_01_0424__en-us_topic_0104967365_parmvalue19490193354912"><b>default</b></span> provided by <span id="dataartsstudio_01_0424__en-us_topic_0104967365_text7490163344913">DLI</span> 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.</p>
<p id="dataartsstudio_01_0424__p1377363318575">In addition, the <span class="parmvalue" id="dataartsstudio_01_0424__parmvalue21061444135720"><b>default</b></span> queue does not support the insert, load, or cat commands.</p>
</div></div>
<p id="dataartsstudio_01_0424__en-us_topic_0104967365_p18631105416596">To set properties for submitting SQL jobs in the form of <span class="parmvalue" id="dataartsstudio_01_0424__en-us_topic_0104967365_parmvalue20419151143520"><b>key/value</b></span>, click <span><img id="dataartsstudio_01_0424__en-us_topic_0104967365_image1839611418218" src="en-us_image_0000002269118105.png"></span>. A maximum of 10 properties can be set. The properties are described as follows:</p>
<div class="note" id="dataartsstudio_01_0424__note12264134132719"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="dataartsstudio_01_0424__ul1223319116288"><li id="dataartsstudio_01_0424__li723421182810">The environment variable must start with <strong id="dataartsstudio_01_0424__b62661313994">hoodie.</strong>, <strong id="dataartsstudio_01_0424__b14517121195">dli.sql.</strong>, <strong id="dataartsstudio_01_0424__b5517217917">dli.ext.</strong>, <strong id="dataartsstudio_01_0424__b135171111913">dli.jobs.</strong>, <strong id="dataartsstudio_01_0424__b105181711692">spark.sql.</strong>, or <strong id="dataartsstudio_01_0424__b13518141893">spark.scheduler.pool</strong>.</li><li id="dataartsstudio_01_0424__li4935611182312">If the environment variable is <strong id="dataartsstudio_01_0424__b19857410916">dli.sql.autoBroadcastJoinThreshold</strong>, the value must be an integer. If the environment variable is <strong id="dataartsstudio_01_0424__b1498513411990">dli.sql.shuffle.partitions</strong>, the value must be a positive integer.</li><li id="dataartsstudio_01_0424__li6234111112813">If the key of the environment variable is <strong id="dataartsstudio_01_0424__b38978301968">dli.sql.shuffle.partitions</strong> or <strong id="dataartsstudio_01_0424__b1589719305615">dli.sql.autoBroadcastJoinThreshold</strong>, the environment variable cannot contain the greater than (&gt;) or less than (&lt;) sign.</li><li id="dataartsstudio_01_0424__li1023419142818">If a parameter with the same name is configured in both a job and a script, the parameter value configured in the job will overwrite that configured in the script.</li></ul>
</div></div>
<div class="p" id="dataartsstudio_01_0424__p7376482261"><ul id="dataartsstudio_01_0424__en-us_topic_0104967365_ul45587104143542"><li id="dataartsstudio_01_0424__en-us_topic_0104967365_li62481695143547"><strong id="dataartsstudio_01_0424__en-us_topic_0104967365_b7264185714525">dli.sql.autoBroadcastJoinThreshold</strong>: specifies the data volume threshold to use BroadcastJoin. If the data volume exceeds the threshold, BroadcastJoin will be automatically enabled.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967365_li43674737143557"><strong id="dataartsstudio_01_0424__en-us_topic_0104967365_b142571846155511">dli.sql.shuffle.partitions</strong>: specifies the number of partitions during shuffling.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967365_li5984456143557"><strong id="dataartsstudio_01_0424__en-us_topic_0104967365_b62306410567">dli.sql.cbo.enabled</strong>: specifies whether to enable the CBO optimization policy.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967365_li29573320143557"><strong id="dataartsstudio_01_0424__en-us_topic_0104967365_b173350173568">dli.sql.cbo.joinReorder.enabled</strong>: specifies whether join reordering is allowed when CBO optimization is enabled.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967365_li4488181185210"><strong id="dataartsstudio_01_0424__en-us_topic_0104967365_b1719423315616">dli.sql.multiLevelDir.enabled</strong>: specifies whether to query the content in subdirectories if there are subdirectories in the specified directory of an OBS table or in the partition directory of an OBS partition table. By default, the content in subdirectories is not queried.</li><li id="dataartsstudio_01_0424__en-us_topic_0104967365_li3415842105617"><strong id="dataartsstudio_01_0424__en-us_topic_0104967365_b1316715819472">dli.sql.dynamicPartitionOverwrite.enabled</strong>: specifies that only partitions used during data query are overwritten and other partitions are not deleted.</li></ul>
</div>
<div class="note" id="dataartsstudio_01_0424__note885410448317"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0424__en-us_topic_0000001423148402_p9498162810283">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:</p>
<ul id="dataartsstudio_01_0424__en-us_topic_0000001423148402_ul17364192142810"><li id="dataartsstudio_01_0424__en-us_topic_0000001423148402_li1652173016283"><strong id="dataartsstudio_01_0424__b68482182112947">spark.sql.adaptive.enabled</strong>: Adaptive Query Execution (AQE) is enabled so that Spark can dynamically optimize the query execution plan based on the characteristics of the data being processed and improve the performance by reducing the amount of data to be processed.</li><li id="dataartsstudio_01_0424__en-us_topic_0000001423148402_li143641221202819"><strong id="dataartsstudio_01_0424__b1720063278112947">spark.sql.adaptive.join.enabled</strong>: AQE is enabled for join operations. The optimal join algorithm is selected based on the data being processed to improve performance.</li><li id="dataartsstudio_01_0424__en-us_topic_0000001423148402_li14364142172811"><strong id="dataartsstudio_01_0424__b674264227112947">spark.sql.adaptive.skewedJoin.enabled</strong>: AQE is enabled for skewed join operations. Skewed data can be automatically detected and the join algorithm is optimized accordingly to improve performance.</li><li id="dataartsstudio_01_0424__en-us_topic_0000001423148402_li103641021172816"><strong id="dataartsstudio_01_0424__b168669660112947">spark.sql.mergeSmallFiles.enabled</strong>: Merging of small files is enabled. Small files can be merged into large ones, improving performance and shortening the processing time. In addition, fewer files need to be read from remote storage, and more local files can be used.</li></ul>
<p id="dataartsstudio_01_0424__en-us_topic_0000001423148402_p191538562273">If you do not want to use these functions, you can set the values of the preceding parameters to <strong id="dataartsstudio_01_0424__b267966074112947">false</strong>.</p>
</div></div>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="dataartsstudio_01_0424__li104995178561">Enter an SQL statement in the editor. You can enter multiple SQL statements.<div class="p" id="dataartsstudio_01_0424__p91816443205"><a name="dataartsstudio_01_0424__li104995178561"></a><a name="li104995178561"></a>The SQL syntax varies depending on the data source. Before developing an SQL statement, learn about the syntax of the corresponding data source.<ul id="dataartsstudio_01_0424__ul1612014263610"><li id="dataartsstudio_01_0424__en-us_topic_0181092880_en-us_topic_0104967364_li1161511292214">DLI SQL scripts: For details, see "Spark SQL Syntax" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i549312491605">Spark SQL Syntax Reference</em> of the DLI service.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_en-us_topic_0104967364_li36157294217">Hive SQL scripts: For details, see "Hive SQL" in<em id="dataartsstudio_01_0424__en-us_topic_0181092880_i9735112783717"> MapReduce Service (MRS) Usage Guide</em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_en-us_topic_0104967364_li1061582910217">DWS SQL scripts: For details, see the syntax descriptions in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i12826391375">Data Warehouse Service (DWS) Usage Guide</em><em id="dataartsstudio_01_0424__en-us_topic_0181092880_i4821839103716"></em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_li243219743613">Spark SQL scripts: For details, see "Spark2x Basic Principles" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i2774154713717">MapReduce Service (MRS) Usage Guide</em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_li395351418443">ClickHouse SQL scripts: For details, see "Common ClickHouse SQL Syntax" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i16735346389">MapReduce Service (MRS) Usage Guide</em><em id="dataartsstudio_01_0424__en-us_topic_0181092880_i9736184183811"></em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_li6237159113712">Impala SQL scripts: For details, see "Impala" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i4199121512382">MapReduce Service (MRS) Usage Guide</em><em id="dataartsstudio_01_0424__en-us_topic_0181092880_i19199161563817"></em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_li92651541154415">Flink SQL scripts: For details, see "Stream SQL Join" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i746802653813">MapReduce Service (MRS) Usage Guide</em><em id="dataartsstudio_01_0424__en-us_topic_0181092880_i446952683820"></em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_li746524319446">RDS SQL scripts: For details, see "Syntax" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i1661155572">Relational Database Service User Guide</em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_li12792021141317">Presto SQL scripts: For details, see "Presto" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i1473345214400">MapReduce Service Overview</em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_li4761585212">Spark Python scripts: For details, see "Configuring the Spark Python3 Sample Project" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i157591913403">Developer Guide</em> in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i10918123124015">MapReduce Service (MRS) Usage Guide</em>.</li><li id="dataartsstudio_01_0424__en-us_topic_0181092880_li12521555174318">Doris SQL scripts: For details, see "Doris Basic Principles" in <em id="dataartsstudio_01_0424__en-us_topic_0181092880_i1540514284413">MapReduce Service (MRS) Usage Guide</em><em id="dataartsstudio_01_0424__en-us_topic_0181092880_i8406104224411"></em>.</li></ul>
</div>
<div class="note" id="dataartsstudio_01_0424__note1357515910162"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dataartsstudio_01_0424__ul193361344111817"><li id="dataartsstudio_01_0424__li53361444184">SQL statements are separated by semicolons (<span class="parmvalue" id="dataartsstudio_01_0424__parmvalue78381418136"><b>;</b></span>). If semicolons are used in other places but not used to separate SQL statements, escape them with backslashes (<span class="parmvalue" id="dataartsstudio_01_0424__en-us_topic_0104967365_parmvalue762013261515"><b>\</b></span>). For example:<pre class="screen" id="dataartsstudio_01_0424__screen857505931613">select 1;
select * from a where b="dsfa\;"; --example 1\;example 2.</pre>
</li><li id="dataartsstudio_01_0424__li033093411712">RDS SQL does not support the begin ... commit transaction syntax. If necessary, use the start transaction ... commit transaction syntax.</li><li id="dataartsstudio_01_0424__li873311161613">The script cannot be larger than 16 MB.</li><li id="dataartsstudio_01_0424__li133634441814">The system date obtained by using an SQL statement is different from that obtained by using the database tool. The query result is stored in the database in the YYYY-MM-DD format, but the query result displayed on the page is in the converted format.</li><li id="dataartsstudio_01_0424__li19186161512220">When a user submits a Spark SQL script to MRS, the script is submitted to the tenant queue bound to the user by default. The bound queue is the queue corresponding to tenant role of the user. If there are multiple queues, the system preferentially selects a queue based on the queue priorities. To set a fixed queue for the user to submit scripts, log in to FusionInsight Manager, choose <strong id="dataartsstudio_01_0424__b19308131594512">Tenant Resources</strong> &gt; <strong id="dataartsstudio_01_0424__b10308215184519">Dynamic Resource Plan</strong>, and click the <strong id="dataartsstudio_01_0424__b03081815154518">Global User Policy</strong> tab. For details, see "Managing Global User Policies" in <em id="dataartsstudio_01_0424__i203092015124512">MapReduce Service (MRS) Usage Guide</em>.</li><li id="dataartsstudio_01_0424__li55661519182314">Flink SQL, Hive SQL, and Spark SQL scripts support syntax check. After the check is complete, you can view the check result in the lower part of the page.</li></ul>
</div></div>
<div class="p" id="dataartsstudio_01_0424__p6791111817564">To facilitate script development, <span id="dataartsstudio_01_0424__text439331819172">DataArts Factory</span> provides the following capabilities:<ul id="dataartsstudio_01_0424__ul2335154451820"><li id="dataartsstudio_01_0424__li203351144151815">The script editor supports the following shortcut keys, which improve the script development efficiency:<ul id="dataartsstudio_01_0424__ul56601946112219"><li id="dataartsstudio_01_0424__li14373185914265"><strong id="dataartsstudio_01_0424__b1066715327468">F8</strong>: Run a script.</li><li id="dataartsstudio_01_0424__li26191439142715"><strong id="dataartsstudio_01_0424__b3889183564616">F9</strong>: Stop running a script.</li><li id="dataartsstudio_01_0424__li36602464228"><strong id="dataartsstudio_01_0424__b13361941164612">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b9808104234618">/</strong>: Comment out or uncomment the line or code block where the cursor resides.</li><li id="dataartsstudio_01_0424__li5660134611221"><strong id="dataartsstudio_01_0424__b1121154714618">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b11411049194618">S</strong>: Save a script.</li><li id="dataartsstudio_01_0424__li866019461229"><strong id="dataartsstudio_01_0424__b17600352124610">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b99931054104611">Z</strong>: Undo an action.</li><li id="dataartsstudio_01_0424__li1866015462221"><strong id="dataartsstudio_01_0424__b195202059174618">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b0891533473">F</strong>: Search for information.</li><li id="dataartsstudio_01_0424__li2066024615229"><strong id="dataartsstudio_01_0424__b187071474475">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b1050671014712">Shift</strong> + <strong id="dataartsstudio_01_0424__b1682941212473">R</strong>: Replace</li><li id="dataartsstudio_01_0424__li4660144642210"><strong id="dataartsstudio_01_0424__b1826401710476">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b5163121913476">X</strong>: Cut (Cut a line when the cursor selects nothing.)</li><li id="dataartsstudio_01_0424__li186601546192215"><strong id="dataartsstudio_01_0424__b27011526194713">Alt</strong> + mouse dragging: Select columns to edit a block.</li><li id="dataartsstudio_01_0424__li19660146112213"><strong id="dataartsstudio_01_0424__b2884233154717">Ctrl</strong> + mouse click: Select multiple lines to edit or indent them together.</li><li id="dataartsstudio_01_0424__li766034613223"><strong id="dataartsstudio_01_0424__b11553184117472">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b15553114174715"></strong> (or <strong id="dataartsstudio_01_0424__b125531441154716"></strong>): Move the cursor rightwards (or leftwards) by word.</li><li id="dataartsstudio_01_0424__li18660546182217"><strong id="dataartsstudio_01_0424__b13154174424719">Ctrl</strong> +<strong id="dataartsstudio_01_0424__b14154644104712"> Home</strong> or <strong id="dataartsstudio_01_0424__b10154194424720">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b8154134420475">End</strong>: Navigate to the beginning or end of the current file.</li><li id="dataartsstudio_01_0424__li15660104662212"><strong id="dataartsstudio_01_0424__b11969745204720">Home</strong> or <strong id="dataartsstudio_01_0424__b096934544712">End</strong>: Navigate to the beginning or end of the current line.</li><li id="dataartsstudio_01_0424__li1666014682218"><strong id="dataartsstudio_01_0424__b644214844712">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b1344214481473">Shift</strong> + <strong id="dataartsstudio_01_0424__b3442548124710">L</strong>: Double-click all the same character strings and add cursors to them to implement batch modification.</li><li id="dataartsstudio_01_0424__li1252313711294"><strong id="dataartsstudio_01_0424__b55181814229">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b181914121320">D</strong>: Delete a line.</li><li id="dataartsstudio_01_0424__li11649122613018"><strong id="dataartsstudio_01_0424__b86391429227">Shift</strong> + <strong id="dataartsstudio_01_0424__b11142153213213">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b143341734529">U</strong>: Unlock a script.</li><li id="dataartsstudio_01_0424__li219431175418"><strong id="dataartsstudio_01_0424__b17791124615217">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b167936481127">Alt</strong> + <strong id="dataartsstudio_01_0424__b16417950628">K</strong>: Select the word where the cursor resides.</li><li id="dataartsstudio_01_0424__li5134344165412"><strong id="dataartsstudio_01_0424__b72811959354">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b011655717519">B</strong>: Format</li><li id="dataartsstudio_01_0424__li94225277567"><strong id="dataartsstudio_01_0424__b13210863125">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b14633108151217">Shift</strong> + <strong id="dataartsstudio_01_0424__b17305710201216">Z</strong>: Redo</li><li id="dataartsstudio_01_0424__li615165415612"><strong id="dataartsstudio_01_0424__b14925193110127">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b13569193411220">Enter</strong>: Execute the selected line or content.</li><li id="dataartsstudio_01_0424__li143125387582"><strong id="dataartsstudio_01_0424__b152921257111218">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b14634185981218">Alt</strong> + <strong id="dataartsstudio_01_0424__b669816121312">F</strong>: Flag</li><li id="dataartsstudio_01_0424__li2713113917215"><strong id="dataartsstudio_01_0424__b362762812139">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b112501331141319">Shift</strong> + <strong id="dataartsstudio_01_0424__b912411331137">K</strong>: Search for the previous one.</li><li id="dataartsstudio_01_0424__li67146391428"><strong id="dataartsstudio_01_0424__b863773919481">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b10292104114815">K</strong>: Search for the next one.</li><li id="dataartsstudio_01_0424__li1371419391024"><strong id="dataartsstudio_01_0424__b1137064514486">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b181074815485">Backspace</strong>: Delete the word to the left of the cursor.</li><li id="dataartsstudio_01_0424__li87154392213"><strong id="dataartsstudio_01_0424__b194591955134815">Ctrl</strong> + <strong id="dataartsstudio_01_0424__b08031011144918">Delete</strong>: Delete the word to the right of the cursor.</li><li id="dataartsstudio_01_0424__li147151039126"><strong id="dataartsstudio_01_0424__b84691133134914">Alt</strong> + <strong id="dataartsstudio_01_0424__b1634736184913">Backspace</strong>: Delete all content from the beginning of the line to the cursor.</li><li id="dataartsstudio_01_0424__li971615395218"><strong id="dataartsstudio_01_0424__b1410471820596">Alt</strong> + <strong id="dataartsstudio_01_0424__b6104111816599">Delete</strong>: Delete all content from the cursor to the end of the line.</li><li id="dataartsstudio_01_0424__li071615397219"><strong id="dataartsstudio_01_0424__b20647205695917">Alt</strong> + <strong id="dataartsstudio_01_0424__b1715611131001">Shift</strong>-<strong id="dataartsstudio_01_0424__b4329220403">Left</strong>: Select all content from the beginning of the line to the cursor.</li><li id="dataartsstudio_01_0424__li871610392213"><strong id="dataartsstudio_01_0424__b68263111623">Alt</strong> + <strong id="dataartsstudio_01_0424__b98263111024">Shift</strong>-<strong id="dataartsstudio_01_0424__b148262011727">Right</strong>: Select all content from the cursor to the end of the line.</li></ul>
</li><li id="dataartsstudio_01_0424__li5335204418188">System functions (Flink SQL, Spark SQL, ClickHouse SQL, and Presto SQL do not support system functions.)<p id="dataartsstudio_01_0424__p17516092224"><a name="dataartsstudio_01_0424__li5335204418188"></a><a name="li5335204418188"></a>To view the functions supported by this type of data connection, click <span class="uicontrol" id="dataartsstudio_01_0424__uicontrol8575175961618"><b>System Functions</b></span> on the right of the editor. You can double-click a function to the editor to use it.</p>
</li><li id="dataartsstudio_01_0424__li11804121913394">Data tables can be read to generate SQL statements. This function is unavailable for Flink SQL, Spark Python, Presto SQL, and ClickHouse SQL.<p id="dataartsstudio_01_0424__p98041219193915"><a name="dataartsstudio_01_0424__li11804121913394"></a><a name="li11804121913394"></a>Click <span class="uicontrol" id="dataartsstudio_01_0424__uicontrol1113119553592"><b>Data Tables</b></span> 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 <strong id="dataartsstudio_01_0424__b161321055175912">Generate SQL Statement</strong> in the lower right corner to generate an SQL statement, which you need to manually format.</p>
</li><li id="dataartsstudio_01_0424__li16575145911611">Script parameters (Currently, only Flink SQL does not support script parameters.)<p id="dataartsstudio_01_0424__p657518593168"><a name="dataartsstudio_01_0424__li16575145911611"></a><a name="li16575145911611"></a>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 <a href="dataartsstudio_01_0494.html">Expression Overview</a>).</p>
<div class="note" id="dataartsstudio_01_0424__note20630106104513"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dataartsstudio_01_0424__p863019614458">If a parameter in an SQL script involves a variable, the format of the variable must be the same as that set in <a href="dataartsstudio_01_04501.html#dataartsstudio_01_04501__section310213518565">Configuring Script Variables</a>. If they are different, the variable cannot be identified.</p>
</div></div>
<p id="dataartsstudio_01_0424__p6575459201615">In the following script example, <em id="dataartsstudio_01_0424__i67642401585">str1</em> indicates the parameter name. It can contain only letters, digits, hyphens (-), underscores (_), greater-than signs (&gt;), and less-than signs (&lt;), and can contain a maximum of 16 characters. The parameter name must be unique.</p>
<pre class="screen" id="dataartsstudio_01_0424__screen1357535918167">select ${str1} from data;</pre>
<div class="p" id="dataartsstudio_01_0424__p135751259121618">For MRS Spark SQL and MRS Hive SQL scripts, you set a program parameter by referring to <span class="parmvalue" id="dataartsstudio_01_0424__parmvalue555316371912"><b>set hive.exec.parallel=true;</b></span> in the SQL statements or configure this parameter by setting <strong id="dataartsstudio_01_0424__b155589372912">Program Parameter</strong> on <strong id="dataartsstudio_01_0424__b155581537597">Node Properties</strong> of the job.<div class="fignone" id="dataartsstudio_01_0424__fig1857519591160"><span class="figcap"><b>Figure 1 </b>Program Parameter</span><br><span><img id="dataartsstudio_01_0424__image52681844184315" src="en-us_image_0000002234238764.png" title="Click to enlarge" class="imgResize"></span></div>
</div>
</li><li id="dataartsstudio_01_0424__li8747124825210">Owner<p id="dataartsstudio_01_0424__p35201452165315"><a name="dataartsstudio_01_0424__li8747124825210"></a><a name="li8747124825210"></a>Click <strong id="dataartsstudio_01_0424__b3390106142918">Basic Info</strong> to set the script owner and description.</p>
</li><li id="dataartsstudio_01_0424__li44652431211">Allows you to go to the release page from the script development page in enterprise mode. Place the cursor over <span><img id="dataartsstudio_01_0424__image260053511820" src="en-us_image_0000002269116013.png"></span> and click <strong id="dataartsstudio_01_0424__b5293135061614">Release</strong>.</li><li id="dataartsstudio_01_0424__li137103134910">For MRS API connections, parameters and values can be configured for Spark SQL and Hive SQL scripts. For proxy connections, this function is not supported.<div class="note" id="dataartsstudio_01_0424__note6737132019111"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dataartsstudio_01_0424__p1330773518115">Click <span><img id="dataartsstudio_01_0424__image12835544335" src="en-us_image_0000002234238748.png"></span> in the upper right corner to set environment variables for scripts. The following are some examples:</p>
<p id="dataartsstudio_01_0424__p2275431619">Set environment variables for a Hive SQL script:</p>
<p id="dataartsstudio_01_0424__p147601301455">--hiveconf hive.merge.mapfiles=true;</p>
<p id="dataartsstudio_01_0424__p47609301850">--hiveconf mapred.job.queue.name=queue1</p>
<p id="dataartsstudio_01_0424__p107381820518">Set environment variables for a Spark SQL script:</p>
<p id="dataartsstudio_01_0424__p16711581896">--num-executors 1</p>
<p id="dataartsstudio_01_0424__p567165814914">--executor-cores 4</p>
<p id="dataartsstudio_01_0424__p116711581492">--queue queue2</p>
<p id="dataartsstudio_01_0424__p1230054212125">The former indicates the parameter name, and the latter indicates the parameter value.</p>
<p id="dataartsstudio_01_0424__p1743512247134">After the script is executed, view the execution details on the MRS management plane.</p>
</div></div>
</li></ul>
</div>
</li><li id="dataartsstudio_01_0424__li1476011035420">(Optional) In the upper part of the editor, click <span class="uicontrol" id="dataartsstudio_01_0424__en-us_topic_0104967365_uicontrol566714434472"><b>Format</b></span> to format SQL statements. When developing a Flink SQL script, skip this step.</li><li id="dataartsstudio_01_0424__li1076011035413">In the upper part of the editor, click <span class="uicontrol" id="dataartsstudio_01_0424__en-us_topic_0104967365_uicontrol4793515202514"><b>Execute</b></span>. If you need to execute some SQL statements separately, select the SQL statements first. After executing the SQL statements, view the execution history and result of the script in the lower part of the editor. When developing a Flink SQL script, skip this step.<div class="note" id="dataartsstudio_01_0424__en-us_topic_0104967365_note18687835202119"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dataartsstudio_01_0424__ul2064612388261"><li id="dataartsstudio_01_0424__li5707175410441">A maximum of 1,000 SQL statement execution results can be displayed. A maximum of 10,000 DLI SQL statement execution results can be displayed. To view more execution results, download or dump them by following the instructions in <a href="#dataartsstudio_01_0424__section2558253151213">Downloading or Dumping a Script Execution Result</a>.</li><li id="dataartsstudio_01_0424__li2024804932617">You can perform the following operations on execution results:<ul id="dataartsstudio_01_0424__ul14207151182813"><li id="dataartsstudio_01_0424__li3574182288">Double-click or right-click the name of an execution result tab to rename it. The name can contain a maximum of 16 characters.</li><li id="dataartsstudio_01_0424__li24232102817">Right-click the name of an execution result tab to close the current tab, all the tabs to the left or right of the current tab, all the other tabs, or all the tabs.</li></ul>
</li><li id="dataartsstudio_01_0424__li2064610385268">If the MRS cluster is a non-security cluster and the command whitelist is not restricted, you can easily find the corresponding task on the Yarn management page of MRS based on the script name and execution time after adding the application name information during Hive SQL execution. Note that if the default engine is <strong id="dataartsstudio_01_0424__b14254101715109">tez</strong>, you need to set the engine to <strong id="dataartsstudio_01_0424__b13259191716102">mr</strong> to disable the tez engine.</li><li id="dataartsstudio_01_0424__li17619233372">When viewing the script execution result, you can double-click a field in any row to view the result details. You can copy the field name.</li><li id="dataartsstudio_01_0424__li183444127719">You can control display of the script execution history by setting <strong id="dataartsstudio_01_0424__b1785141313301">Script Execution History</strong> in <strong id="dataartsstudio_01_0424__b2962161610303">Default Configuration</strong> to <strong id="dataartsstudio_01_0424__b1943110206309">Myself</strong> or <strong id="dataartsstudio_01_0424__b161991225123012">All users</strong>.</li></ul>
</div></div>
</li><li id="dataartsstudio_01_0424__li976018016547">Above the editor, click <strong id="dataartsstudio_01_0424__b1828193614304">Save</strong> to save the script.<div class="p" id="dataartsstudio_01_0424__en-us_topic_0104967365_p9461125175714">If the script is created but not saved, set the parameters listed in <a href="#dataartsstudio_01_0424__en-us_topic_0104967365_table35383235269">Table 2</a>.
<div class="tablenoborder"><a name="dataartsstudio_01_0424__en-us_topic_0104967365_table35383235269"></a><a name="en-us_topic_0104967365_table35383235269"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0424__en-us_topic_0104967365_table35383235269" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Script parameters</caption><thead align="left"><tr id="dataartsstudio_01_0424__en-us_topic_0104967365_row55381123202616"><th align="left" class="cellrowborder" valign="top" width="20.18%" id="mcps1.3.4.2.9.2.2.2.4.1.1"><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p1153817231264">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.67%" id="mcps1.3.4.2.9.2.2.2.4.1.2"><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p195381623142618">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67.15%" id="mcps1.3.4.2.9.2.2.2.4.1.3"><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p75541123192614">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0424__en-us_topic_0104967365_row5554122311266"><td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.9.2.2.2.4.1.1 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p155414231262">Script Name</p>
</td>
<td class="cellrowborder" valign="top" width="12.67%" headers="mcps1.3.4.2.9.2.2.2.4.1.2 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p7554122342613">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="67.15%" headers="mcps1.3.4.2.9.2.2.2.4.1.3 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p255482312611">Name of the script. The name contains a maximum of 128 characters, including only letters, numbers, hyphens (-), underscores (_), and periods (.).</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row2189204233715"><td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.9.2.2.2.4.1.1 "><p id="dataartsstudio_01_0424__p4190642123714">Owners</p>
</td>
<td class="cellrowborder" valign="top" width="12.67%" headers="mcps1.3.4.2.9.2.2.2.4.1.2 "><p id="dataartsstudio_01_0424__p19191114217374">No</p>
</td>
<td class="cellrowborder" valign="top" width="67.15%" headers="mcps1.3.4.2.9.2.2.2.4.1.3 "><p id="dataartsstudio_01_0424__p1191144223719">Owner of the script. By default, the creator of the script is the owner.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__en-us_topic_0104967365_row155541323182616"><td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.9.2.2.2.4.1.1 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p655422312266">Description</p>
</td>
<td class="cellrowborder" valign="top" width="12.67%" headers="mcps1.3.4.2.9.2.2.2.4.1.2 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p4554122316263">No</p>
</td>
<td class="cellrowborder" valign="top" width="67.15%" headers="mcps1.3.4.2.9.2.2.2.4.1.3 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p13554112392618">Descriptive information about the script.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__en-us_topic_0104967365_row25851239261"><td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.9.2.2.2.4.1.1 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p18585623182610">Select Directory</p>
</td>
<td class="cellrowborder" valign="top" width="12.67%" headers="mcps1.3.4.2.9.2.2.2.4.1.2 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p16585112317266">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="67.15%" headers="mcps1.3.4.2.9.2.2.2.4.1.3 "><p id="dataartsstudio_01_0424__en-us_topic_0104967365_p9585102317266">Directory to which the script belongs. The root directory is selected by default.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="dataartsstudio_01_0424__note1913422012563"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dataartsstudio_01_0424__p5134172010566">If you open an unsaved script, you can restore its content from the local cache.</p>
<p id="dataartsstudio_01_0424__p1846155151511">After the script is saved, a version is automatically generated and displayed in <strong id="dataartsstudio_01_0424__b1190615336913">Versions</strong>. 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 <strong id="dataartsstudio_01_0424__b20447153817916">Save new version</strong> to save and add a version.</p>
</div></div>
</div>
</li></ol>
</div>
<div class="section" id="dataartsstudio_01_0424__section2558253151213"><a name="dataartsstudio_01_0424__section2558253151213"></a><a name="section2558253151213"></a><h4 class="sectiontitle">Downloading or Dumping a Script Execution Result</h4><div class="p" id="dataartsstudio_01_0424__p14694145254015">After a script is executed successfully, you can download or dump the execution result. By default, all users can download and dump the execution results of SQL scripts. If you do not want all users to have this permission, configure the permission by referring to <a href="dataartsstudio_01_04501.html#dataartsstudio_01_04501__section1970845152011">Configuring a Data Export Policy</a>.<ul id="dataartsstudio_01_0424__ul594619010228"><li id="dataartsstudio_01_0424__li123561599219">After executing a script, you can click <strong id="dataartsstudio_01_0424__b016210101483">Download</strong> on the <strong id="dataartsstudio_01_0424__b216214101812">Result</strong> tab page to download a CSV result file to a local path. You can view the download record on the <a href="dataartsstudio_01_1821.html">Download Center</a> page.</li><li id="dataartsstudio_01_0424__li4357359152119">After executing a script, you can click <strong id="dataartsstudio_01_0424__b16939145414916">Dump</strong> on the <strong id="dataartsstudio_01_0424__b169398541917">Result</strong> tab page to dump a CSV and a JSON result file to OBS. For details, see <a href="#dataartsstudio_01_0424__table1192101552416">Table 3</a>.<div class="note" id="dataartsstudio_01_0424__note94071945142212"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dataartsstudio_01_0424__ul114901431491"><li id="dataartsstudio_01_0424__li5777114884920">The dump function is supported only if the OBS service is available.</li><li id="dataartsstudio_01_0424__li8490174312496">Only the execution results of SQL script query statements can be dumped. </li><li id="dataartsstudio_01_0424__li1064142917164">If the execution result of a download or dump SQL statement contains commas (,), newline characters, or other special characters, data may be disordered, the number of rows may increase, or other issues may occur.</li></ul>
</div></div>
<div class="tablenoborder"><a name="dataartsstudio_01_0424__table1192101552416"></a><a name="table1192101552416"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0424__table1192101552416" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Dump parameters</caption><thead align="left"><tr id="dataartsstudio_01_0424__row15922515192417"><th align="left" class="cellrowborder" valign="top" width="18.17%" id="mcps1.3.5.2.2.2.5.2.4.1.1"><p id="dataartsstudio_01_0424__p29222015142417">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.200000000000001%" id="mcps1.3.5.2.2.2.5.2.4.1.2"><p id="dataartsstudio_01_0424__p1892241562411">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68.63%" id="mcps1.3.5.2.2.2.5.2.4.1.3"><p id="dataartsstudio_01_0424__p792271532416">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0424__row2922515142417"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p4922101518241">Data Format</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p1292291511248">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><p id="dataartsstudio_01_0424__p10922101532411">Format of the data to be exported. CSV and JSON formats are supported.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row15922115202417"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p16922515102419">Resource Queue</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p992241502418">No</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><p id="dataartsstudio_01_0424__p199221715192417"><span id="dataartsstudio_01_0424__text6922415192411">DLI</span> queue where the export operation is to be performed. Set this parameter when a DLI or SQL script is created.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row16922215182418"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p7922715102418">Compression Format</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p5922815182415">No</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><p id="dataartsstudio_01_0424__p592211153241">Format of compression. Set this parameter when a DLI or SQL script is created.</p>
<ul id="dataartsstudio_01_0424__ul149231715182410"><li id="dataartsstudio_01_0424__li1392316153244">none</li><li id="dataartsstudio_01_0424__li9923161542411">bzip2</li><li id="dataartsstudio_01_0424__li1592361518245">deflate</li><li id="dataartsstudio_01_0424__li1592331542416">gzip</li></ul>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row10923101510246"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p192311522419">Storage Path</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p13924191519243">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><p id="dataartsstudio_01_0424__p0924715182413">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.</p>
<p id="dataartsstudio_01_0424__p990561775112">You can also go to the <a href="dataartsstudio_01_1821.html">Download Center</a> page to set the default OBS path, which will be automatically set for <strong id="dataartsstudio_01_0424__b2413115781710">Storage Path</strong> in the <strong id="dataartsstudio_01_0424__b15414155715175">Dump Result</strong> dialog box.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row19924101518248"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p6924715172415">Cover Type</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p14924111522419">No</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><p id="dataartsstudio_01_0424__p3924191562414">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.</p>
<ul id="dataartsstudio_01_0424__ul12924161520245"><li id="dataartsstudio_01_0424__li13924121512240"><strong id="dataartsstudio_01_0424__en-us_topic_0104967365_b0982153513287">Overwrite</strong>: The existing folder will be overwritten by the customized folder.</li><li id="dataartsstudio_01_0424__li1292491552413"><strong id="dataartsstudio_01_0424__en-us_topic_0104967365_b1859416222916">Report</strong>: The system reports an error and suspends the export operation.</li></ul>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row973516242714"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p973642162714">Export Column Name</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p11736182182717">No</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><p id="dataartsstudio_01_0424__p20736322273"><strong id="dataartsstudio_01_0424__b1193109141518">Yes</strong>: Column names will be exported.</p>
<p id="dataartsstudio_01_0424__p1756182916283"><strong id="dataartsstudio_01_0424__b1597083851520">No</strong>: Column names will not be exported.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row28617592714"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p08720513276">Character Set</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p13871756274">No</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><ul id="dataartsstudio_01_0424__ul981282316294"><li id="dataartsstudio_01_0424__li08120235298"><strong id="dataartsstudio_01_0424__b184370324168">UTF-8</strong>: default character set</li><li id="dataartsstudio_01_0424__li9812142312919"><strong id="dataartsstudio_01_0424__b10628856171616">GB2312</strong>: recommended when the data to be exported contains Chinese character sets</li><li id="dataartsstudio_01_0424__li1581213238292"><strong id="dataartsstudio_01_0424__b141634816182">GBK</strong>: expanded based on and compatible with GB2312</li></ul>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row748933615718"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p848919365571">Quotation Character</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p54891736135711">No</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><p id="dataartsstudio_01_0424__p1928923312316">This parameter is available and can be set only when <strong id="dataartsstudio_01_0424__b263866162310">Data Format</strong> is <strong id="dataartsstudio_01_0424__b1563926162313">csv</strong>.</p>
<p id="dataartsstudio_01_0424__p132810532401">Quotation characters are used to identify the beginning and end of text fields when exporting job results, and are used to separate fields.</p>
<p id="dataartsstudio_01_0424__p1752471112158">Only one character can be set. The default value is double quotation marks (").</p>
<p id="dataartsstudio_01_0424__p18721118203114">This is mainly used to handle data that contains spaces, special characters, or characters that are the same as the delimiter.</p>
<p id="dataartsstudio_01_0424__p4471113410395">For details about the examples of using quotation characters and escape characters, see <a href="#dataartsstudio_01_0424__section1729219531331">Example of Using Quotation Characters and Escape Characters</a>.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row542984014571"><td class="cellrowborder" valign="top" width="18.17%" headers="mcps1.3.5.2.2.2.5.2.4.1.1 "><p id="dataartsstudio_01_0424__p1242915403575">Escape Character</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.5.2.2.2.5.2.4.1.2 "><p id="dataartsstudio_01_0424__p154291840175715">No</p>
</td>
<td class="cellrowborder" valign="top" width="68.63%" headers="mcps1.3.5.2.2.2.5.2.4.1.3 "><p id="dataartsstudio_01_0424__p142620340233">This parameter is available and can be set only when <strong id="dataartsstudio_01_0424__b6559114502313">Data Format</strong> is <strong id="dataartsstudio_01_0424__b5559945122318">csv</strong>.</p>
<p id="dataartsstudio_01_0424__p061683714223">If special characters, such as quotation marks, need to be included in the exported results, they can be represented using escape characters (backslash \).</p>
<p id="dataartsstudio_01_0424__p2064024216443">Only one character can be set. The default value is a backslash (\).</p>
<p id="dataartsstudio_01_0424__p20662252134220">Common scenarios for using escape characters are:</p>
<ul id="dataartsstudio_01_0424__ul115001721174310"><li id="dataartsstudio_01_0424__li1350082118438">If there is a third quotation mark between two quotation marks, add an escape character before the third quotation mark to prevent the field content from being split.</li><li id="dataartsstudio_01_0424__li11500122120430">If there is already an escape character in the data content, add another escape character before the existing one to avoid the original character being used as an escape character.</li></ul>
<p id="dataartsstudio_01_0424__p11317121104014">For details about the examples of using quotation characters and escape characters, see <a href="#dataartsstudio_01_0424__section1729219531331">Example of Using Quotation Characters and Escape Characters</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="p" id="dataartsstudio_01_0424__p2785161544717">Download or dump allows you to view more SQL script execution results. <a href="#dataartsstudio_01_0424__table19855813154916">Table 4</a> lists the maximum number of results that can be viewed, dumped, and downloaded for different types of SQL scripts.
<div class="tablenoborder"><a name="dataartsstudio_01_0424__table19855813154916"></a><a name="table19855813154916"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0424__table19855813154916" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Maximum number of results that can be viewed, dumped, and downloaded</caption><thead align="left"><tr id="dataartsstudio_01_0424__row1985617132494"><th align="left" class="cellrowborder" valign="top" width="16.8%" id="mcps1.3.5.3.2.2.5.1.1"><p id="dataartsstudio_01_0424__p2252193494914">SQL Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.860000000000003%" id="mcps1.3.5.3.2.2.5.1.2"><p id="dataartsstudio_01_0424__p1925173484917">Maximum Number of Results That Can Be Viewed Online</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.669999999999998%" id="mcps1.3.5.3.2.2.5.1.3"><p id="dataartsstudio_01_0424__p1625018342499">Maximum Number/Size of Results That Can Be Downloaded</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.67%" id="mcps1.3.5.3.2.2.5.1.4"><p id="dataartsstudio_01_0424__p117193171507">Maximum Number/Size of Results That Can Be Dumped</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0424__row154391225141410"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p19246203424913">DLI</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p1324533414492">10,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p17244634154918">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p644012251140">Unlimited</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row198568137498"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p152481134174918">Hive</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p13247113419495">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p19246173419490">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p147201817105019">10,000 records or 3 MB</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row168571513114919"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p18243103418495">GaussDB(DWS)</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p13242634144920">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p22411834164915">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p57206171507">10,000 records or 3 MB</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row178571313204920"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p1723619347495">Spark</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p723523413491">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p5233134134918">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p172017175508">10,000 records or 3 MB</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row18740153061717"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p15740173031716">RDS</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p07401730121717">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p47401330131715">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p4583134581210">Not supported</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row1654393815176"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p1254353861710">Presto</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p5448101718528">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p11844357113212">The downloaded results are directly dumped to OBS. The number of results is unlimited.</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p20115441113815">Unlimited</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row106601122181713"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p66601622191720">ClickHouse</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p17661162210173">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p11661142210179">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p136611422181713">10,000 records or 3 MB</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row12795194317241"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p8796174312419">HetuEngine</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p119253494418">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p6192734174418">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p1519217347441">10,000 records or 3 MB</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row137835197276"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p17783119152714">Impala</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p47831619182718">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p5638627184411">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p181921653191112">10,000 records or 3 MB</p>
</td>
</tr>
<tr id="dataartsstudio_01_0424__row4753173120536"><td class="cellrowborder" valign="top" width="16.8%" headers="mcps1.3.5.3.2.2.5.1.1 "><p id="dataartsstudio_01_0424__p6754163114530">Doris</p>
</td>
<td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.2.5.1.2 "><p id="dataartsstudio_01_0424__p9754631185319">1,000</p>
</td>
<td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.2.5.1.3 "><p id="dataartsstudio_01_0424__p14755193115315">1,000 records, less than 3MB</p>
</td>
<td class="cellrowborder" valign="top" width="27.67%" headers="mcps1.3.5.3.2.2.5.1.4 "><p id="dataartsstudio_01_0424__p127554313532">1,000 records or 3 MB</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="dataartsstudio_01_0424__section1729219531331"><a name="dataartsstudio_01_0424__section1729219531331"></a><a name="section1729219531331"></a><h4 class="sectiontitle">Example of Using Quotation Characters and Escape Characters</h4><ul id="dataartsstudio_01_0424__ul20863159563"><li id="dataartsstudio_01_0424__li1548719308297">Usage of quotation characters and escape characters:<ul id="dataartsstudio_01_0424__ul155093317293"><li id="dataartsstudio_01_0424__li7863791668">Quotation character: used to identify and separate fields. The default value is double quotation marks (").</li><li id="dataartsstudio_01_0424__li5863891466">Escape character: If special characters, such as quotation marks, need to be included in the exported results, they can be represented using escape characters (backslash \). The default value is a backslash (\).<ol id="dataartsstudio_01_0424__ol135201946763"><li id="dataartsstudio_01_0424__li25201346266">To prevent the content of a field from being split when there is a third quotation character between two quotation characters, add an escape character before the third quotation character.</li><li id="dataartsstudio_01_0424__li652015468617">If there is already an escape character in the data content, add another escape character before the existing one to avoid the original character being used as an escape character.</li></ol>
</li></ul>
</li><li id="dataartsstudio_01_0424__li1360131431315">Example:<p id="dataartsstudio_01_0424__p136572574279"><a name="dataartsstudio_01_0424__li1360131431315"></a><a name="li1360131431315"></a><span><img id="dataartsstudio_01_0424__image12423103965417" src="en-us_image_0000002269198189.png" title="Click to enlarge" class="imgResize"></span></p>
<p id="dataartsstudio_01_0424__p993542154513"></p>
<p id="dataartsstudio_01_0424__p911814545351">You can leave <strong id="dataartsstudio_01_0424__b2009355114291">Quotation Character</strong> and <strong id="dataartsstudio_01_0424__b736996277291">Escape Character</strong> empty.</p>
<p id="dataartsstudio_01_0424__p2843200143620"><span><img id="dataartsstudio_01_0424__image33201336133216" src="en-us_image_0000002234078892.png" title="Click to enlarge" class="imgResize"></span></p>
<p id="dataartsstudio_01_0424__p105011728145310"></p>
<p id="dataartsstudio_01_0424__p557571012282">If you leave them empty, the downloaded .csv file contains two rows in Excel.</p>
<p id="dataartsstudio_01_0424__p8923846103510"><span><img id="dataartsstudio_01_0424__image172461047143513" src="en-us_image_0000002234078900.png"></span></p>
<p id="dataartsstudio_01_0424__p16580757133820">If you specify both of them, for example, enter double quotation marks ("), the downloaded file is as follows.</p>
<p id="dataartsstudio_01_0424__p8844617164413"><span><img id="dataartsstudio_01_0424__image2083313537445" src="en-us_image_0000002234238756.png"></span></p>
</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_01_0406.html">Developing Scripts</a></div>
</div>
</div>
<script language="JavaScript">
<!--
initImageViewer('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>