forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com> Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
267 lines
24 KiB
HTML
267 lines
24 KiB
HTML
<a name="dli_02_0024"></a><a name="dli_02_0024"></a>
|
|
|
|
<h1 class="topictitle1">Exporting Query Results</h1>
|
|
<div id="body8662426"><div class="section" id="dli_02_0024__s8f3c49e4c1b64c1e9847f0382f5ebe00"><h4 class="sectiontitle">Function</h4><p id="dli_02_0024__en-us_topic_0069077814_p21784659">This API is used to export results returned from the query using SQL statements to OBS. Only the query result of <strong id="dli_02_0024__b842352706151254">QUERY</strong> jobs can be exported.</p>
|
|
<ul id="dli_02_0024__ul20118291113437"><li id="dli_02_0024__li39965034113437">This API is asynchronous.</li><li id="dli_02_0024__li59070512113437">Currently, data can be exported only to OBS, and the OBS path must be specified to the folder level. The OBS path cannot contain commas (,). The OBS bucket name cannot end with the regular expression format ".[0-9]+(.*)". Specifically, if the bucket name contains dots (.), the last dot (.) cannot be followed by a digit, for example, "**.12abc" and "**.12".</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_02_0024__see6cb792336246b389c06fba699c6a19"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0024__en-us_topic_0069077814_ul19726930"><li id="dli_02_0024__en-us_topic_0069077814_li43324645">URI format<p id="dli_02_0024__en-us_topic_0069077814_p54377486"><a name="dli_02_0024__en-us_topic_0069077814_li43324645"></a><a name="en-us_topic_0069077814_li43324645"></a>POST /v1.0/{project_id}/jobs/{job_id}/export-result</p>
|
|
</li><li id="dli_02_0024__li4328106416">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0024__en-us_topic_0069077814_table19635326" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="dli_02_0024__en-us_topic_0069077814_row58575353"><th align="left" class="cellrowborder" valign="top" width="16.92169216921692%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0024__en-us_topic_0069077814_p24211849733">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.96139613961396%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="dli_02_0024__en-us_topic_0069077814_p154212494314">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.271527152715272%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="dli_02_0024__p17716201910273">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.84538453845384%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="dli_02_0024__en-us_topic_0069077814_p142115491331">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0024__row1613317314419"><td class="cellrowborder" valign="top" width="16.92169216921692%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0024__en-us_topic_0069077803_p43412436">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.96139613961396%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0024__en-us_topic_0069077803_p26746391">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.271527152715272%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0024__p5717151942717">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.84538453845384%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0024__p1310472724012">Project ID, which is used for resource isolation. For details about how to obtain its value, see <a href="dli_02_0183.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__en-us_topic_0069077814_row21896608"><td class="cellrowborder" valign="top" width="16.92169216921692%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0024__en-us_topic_0069077814_p28794863">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.96139613961396%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0024__en-us_topic_0069077814_p50682599">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.271527152715272%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0024__p12717719162719">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.84538453845384%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0024__p19301152611105">Job ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_02_0024__s8dda6ccfbea24c868af158e0aa7822c5"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0024__en-us_topic_0069077814_table6839801" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="dli_02_0024__en-us_topic_0069077814_row31115796"><th align="left" class="cellrowborder" valign="top" width="20.369999999999997%" id="mcps1.3.3.2.2.5.1.1"><p id="dli_02_0024__en-us_topic_0069077814_p785123114410">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.6%" id="mcps1.3.3.2.2.5.1.2"><p id="dli_02_0024__a9cbd894ab2d34dd0bd43b4d9a5fea6a9">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.58%" id="mcps1.3.3.2.2.5.1.3"><p id="dli_02_0024__en-us_topic_0069077814_p28511131847">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59.45%" id="mcps1.3.3.2.2.5.1.4"><p id="dli_02_0024__en-us_topic_0069077814_p98511131148">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0024__en-us_topic_0069077814_row48003701"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__en-us_topic_0069077814_p63094539">data_path</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__en-us_topic_0069077814_p10384034">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__en-us_topic_0069077814_p35800417">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__en-us_topic_0069077814_p14152689">Path for storing the exported data. Currently, data can be stored only on OBS. The OBS path cannot contain folders, for example, the <strong id="dli_02_0024__b842352706151528">path</strong> folder in the sample request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__en-us_topic_0069077814_row60265343"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__en-us_topic_0069077814_p49654603">compress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__en-us_topic_0069077814_p62599867">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__en-us_topic_0069077814_p37424439">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__en-us_topic_0069077814_p11480744">Compression format of exported data. Currently, <strong id="dli_02_0024__b842352706154031">gzip</strong>, <strong id="dli_02_0024__b842352706154034">bzip2</strong>, and <strong id="dli_02_0024__b842352706154037">deflate</strong> are supported. The default value is <strong id="dli_02_0024__b842352706154042">none</strong>, indicating that data is not compressed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__en-us_topic_0069077814_row36217840"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__en-us_topic_0069077814_p47963947">data_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__en-us_topic_0069077814_p59874511">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__en-us_topic_0069077814_p17997186">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__en-us_topic_0069077814_p48485999">Storage format of exported data. Currently, only CSV and JSON are supported.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row1055940164"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__p8997725823">queue_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__p1399719251626">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__p999752510211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__p799712251428">Name of the queue that is specified to execute a task. If no queue is specified, the default queue is used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row10400346175818"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__p24001646175811">export_mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__p1040114612584">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__p1640154635815">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__p1715719535481">Export mode. The parameter value can be <span class="parmvalue" id="dli_02_0024__parmvalue1897215027152752"><b>ErrorIfExists</b></span> or <span class="parmvalue" id="dli_02_0024__parmvalue1869176295152752"><b>Overwrite</b></span>. If <span class="parmname" id="dli_02_0024__parmname188886138315285"><b>export_mode</b></span> is not specified, this parameter is set to <span class="parmvalue" id="dli_02_0024__parmvalue858623636152818"><b>ErrorIfExists</b></span> by default.</p>
|
|
<ul id="dli_02_0024__ul1546719413358"><li id="dli_02_0024__li15467124143510"><span class="parmvalue" id="dli_02_0024__parmvalue64639903104412"><b>ErrorIfExists</b></span>: Ensure that the specified export directory does not exist. If the specified export directory exists, an error is reported and the export operation cannot be performed.</li><li id="dli_02_0024__li04671843354"><span class="parmvalue" id="dli_02_0024__parmvalue31923096104825"><b>Overwrite</b></span>: If you add new files to a specific directory, existing files will be deleted.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row1797118337358"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__p7237131352610">with_column_header</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__p323711312614">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__p1623810130266">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__p32941783315">Whether to export column names when exporting CSV and JSON data.</p>
|
|
<ul id="dli_02_0024__ul4802193783212"><li id="dli_02_0024__li1580213711320">If this parameter is set to <strong id="dli_02_0024__b842352706203855">true</strong>, the column names are exported.</li><li id="dli_02_0024__li168021370329">If this parameter is set to <strong id="dli_02_0024__b1708647709">false</strong>, the column names are not exported.</li><li id="dli_02_0024__li880263743218">If this parameter is left blank, the default value <strong id="dli_02_0024__b842352706203916">false</strong> is used.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row6221132116012"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__p333019323120">limit_num</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__p173312032913">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__p1833116321519">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__p153311832513">Number of data records to be exported. The default value is <span class="parmvalue" id="dli_02_0024__parmvalue149415914496"><b>0</b></span>, indicating that all data records are exported.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row207241240123319"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__p1072412404339">encoding_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__p47251340113315">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__p572544012332">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__p1461618376225">Encoding format of the data to be exported. The default value is <strong id="dli_02_0024__b1491394617128">utf-8</strong>.</p>
|
|
<p id="dli_02_0024__p20496489540">The options include:</p>
|
|
<ul id="dli_02_0024__ul124413200554"><li id="dli_02_0024__li1444122065511">utf-8</li><li id="dli_02_0024__li1440209550">gb2312</li><li id="dli_02_0024__li19441520185513">gbk</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row577732193315"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__p14780323339">quote_char</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__p77261445143312">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__p1878173217339">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__p322418497358">User-defined quote character.</p>
|
|
<p id="dli_02_0024__p107863233316">The default value is double quotes (").</p>
|
|
<p id="dli_02_0024__p87411538813">This parameter is available and can be set only when <strong id="dli_02_0024__b8157654141316">Data Format</strong> is <strong id="dli_02_0024__b7157754141317">csv</strong>.</p>
|
|
<p id="dli_02_0024__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="dli_02_0024__p1752471112158">Only one character can be set.</p>
|
|
<p id="dli_02_0024__p18721118203114">This is mainly used to handle data that contains spaces, special characters, or characters that are the same as the delimiter.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row177817321330"><td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0024__p6789324333">escape_char</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.6%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0024__p1172616452335">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.58%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0024__p1078143215339">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0024__p7211125218357">User-defined escape character.</p>
|
|
<p id="dli_02_0024__p478143223311">The default value is a backslash (\).</p>
|
|
<p id="dli_02_0024__p18583124117910">This parameter is available and can be set only when <strong id="dli_02_0024__b1741464141518">Data Format</strong> is <strong id="dli_02_0024__b144143413154">csv</strong>.</p>
|
|
<p id="dli_02_0024__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="dli_02_0024__p2064024216443">Only one character can be set.</p>
|
|
<p id="dli_02_0024__p20662252134220">Common scenarios for using escape characters are:</p>
|
|
<ul id="dli_02_0024__ul115001721174310"><li id="dli_02_0024__li1350082118438">If there is a third quotation mark between two quotation marks, add an escape character before the third quotation mark to avoid the field content being split.</li><li id="dli_02_0024__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>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0024__s0d7de5aeff99479eb3a72f311e1ad3c7"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0024__en-us_topic_0069077814_table60129687" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0024__en-us_topic_0069077814_row20495668"><th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0024__en-us_topic_0069077814_p139112501548">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.54%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0024__a60fbcb1d1e7b4615a098895b0f426132">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.62%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0024__en-us_topic_0069077814_p239111505415">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="58.84%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0024__en-us_topic_0069077814_p339165019415">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0024__en-us_topic_0069077814_row46573083"><td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0024__en-us_topic_0069077814_p14323358">is_success</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.54%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0024__en-us_topic_0069077814_p19341321">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.62%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0024__en-us_topic_0069077814_p23143173">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.84%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0024__p899244313414">Indicates whether the request is successfully sent. Value <span class="parmvalue" id="dli_02_0024__parmvalue123486291675"><b>true</b></span> indicates that the request is successfully sent.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__en-us_topic_0069077814_row27048584"><td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0024__en-us_topic_0069077814_p43451716">message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.54%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0024__en-us_topic_0069077814_p29928141">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.62%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0024__en-us_topic_0069077814_p8260362">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.84%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0024__p19992204319342">System prompt. If execution succeeds, the parameter setting may be left blank.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row1191916151310"><td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0024__p152031611311">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.54%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0024__p192021631319">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.62%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0024__p92019164131">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.84%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0024__en-us_topic_0069077807_p52058427">ID of a job returned after a job is generated and submitted by using SQL statements. The job ID can be used to query the job status and results.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row38145234172"><td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0024__p208182023111712">job_mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.54%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0024__p3229125212417">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.62%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0024__p922911524243">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.84%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0024__p4229105292420">Job execution mode. The options are as follows:</p>
|
|
<ul id="dli_02_0024__ul194411241202517"><li id="dli_02_0024__li16442124112518"><strong id="dli_02_0024__b1261512311003">async</strong>: asynchronous</li><li id="dli_02_0024__li2441252182510"><strong id="dli_02_0024__b694923218018">sync</strong>: synchronous</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0024__section156191365180"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0024__p39682489244">Export query results of SQL statements to OBS and stores the results in JSON format.</p>
|
|
<pre class="screen" id="dli_02_0024__screen2590096015223">{
|
|
"data_path": "obs://obs-bucket1/path",
|
|
"data_type": "json",
|
|
"compress": "gzip",
|
|
"with_column_header": "true",
|
|
"queue_name": "queue2",
|
|
"limit_num": 10
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dli_02_0024__section2952393915123"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0024__screen424765991535">{
|
|
"is_success": true,
|
|
"message": "",
|
|
"job_id": "37a40ef9-86f5-42e6-b4c6-8febec89cc20",
|
|
"job_mode":"async"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dli_02_0024__sf39cfd445ad24e9e82754fcb0027179d"><h4 class="sectiontitle">Status Codes</h4><p id="dli_02_0024__a04144ca3a08e4576b386c6a98f43a2ae"><a href="#dli_02_0024__tb12870f1c5f24b27abd55ca24264af36">Table 4</a> describes the status code.</p>
|
|
|
|
<div class="tablenoborder"><a name="dli_02_0024__tb12870f1c5f24b27abd55ca24264af36"></a><a name="tb12870f1c5f24b27abd55ca24264af36"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0024__tb12870f1c5f24b27abd55ca24264af36" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status codes</caption><thead align="left"><tr id="dli_02_0024__r8d54231f95b14c01a5e55e95f3b2e838"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.7.3.2.3.1.1"><p id="dli_02_0024__ab49d21f312644072a331f43e92baf853">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.7.3.2.3.1.2"><p id="dli_02_0024__aea1d3bd107bb4c499da79a88832d256c">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0024__r211ad4eb571d4d938e5579998723174e"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0024__a3153e07b3a9749adba92599fe6628fbf">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0024__p104431642124811">Export successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row44937531727"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0024__p184941532219">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0024__p2049413539219">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0024__row65331212142411"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0024__p5537171216249">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0024__p953813124249">Internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0024__section13596141025715"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0024__p420584425712">If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see <a href="dli_02_0056.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0158.html">SQL Job-related APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|