Files
doc-exports/docs/dataartsstudio/umn/dataartsstudio_01_0291.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

101 lines
19 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="dataartsstudio_01_0291"></a><a name="dataartsstudio_01_0291"></a>
<h1 class="topictitle1">From a ShenTong Database</h1>
<div id="body8662426"><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p18117455259">If the source link of a job is a ShenTong database link, configure the source job parameters based on <a href="#dataartsstudio_01_0291__en-us_topic_0000001521121733_table5046103815165">Table 1</a>.</p>
<div class="tablenoborder"><a name="dataartsstudio_01_0291__en-us_topic_0000001521121733_table5046103815165"></a><a name="en-us_topic_0000001521121733_table5046103815165"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_table5046103815165" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dataartsstudio_01_0291__en-us_topic_0000001521121733_row585315215165"><th align="left" class="cellrowborder" valign="top" width="12.03879612038796%" id="mcps1.3.2.2.5.1.1"><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p434331215165">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.378562143785622%" id="mcps1.3.2.2.5.1.2"><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p1626397215165">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.18438156184381%" id="mcps1.3.2.2.5.1.3"><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p4231334915165">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.398260173982603%" id="mcps1.3.2.2.5.1.4"><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p482921015165">Example Value</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0291__en-us_topic_0000001521121733_row14855115919313"><td class="cellrowborder" rowspan="4" valign="top" width="12.03879612038796%" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p585515591337">Basic parameters</p>
</td>
<td class="cellrowborder" valign="top" width="14.378562143785622%" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p285520591138">Use SQL Statement</p>
</td>
<td class="cellrowborder" valign="top" width="56.18438156184381%" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p685595915311">Whether you can use SQL statements to export data from a relational database</p>
</td>
<td class="cellrowborder" valign="top" width="17.398260173982603%" headers="mcps1.3.2.2.5.1.4 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p1685510591937">No</p>
</td>
</tr>
<tr id="dataartsstudio_01_0291__en-us_topic_0000001521121733_row1122012394320"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p92201739139">SQL Statement</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p5220739135">When <span class="parmname" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_parmname17143060133531"><b>Use SQL Statement</b></span> is set to <span class="parmvalue" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_parmvalue32303868133531"><b>Yes</b></span>, enter an SQL statement here. CDM exports data based on the SQL statement.</p>
<div class="note" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_note1624112587564"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_ul95781925125319"><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li15578132545313">SQL statements can only be used to query data. Join and nesting are supported, but multiple query statements are not allowed, for example, <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_b143067633772251">select * from table a; select * from table b</strong>.</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li115789258538">With statements are not supported.</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li15578152525319">Comments, such as <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_b148619239372251">--</strong> and <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_b187717313372251">/*</strong>, are not supported.</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li115785251536">Addition, deletion, and modification operations are not supported, including but not limited to the following:<ul id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_ul185084210539"><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li1623929145315">load data</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li15832356155310">delete from</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li144890175411">alter table</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li17896205419">create table</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li7715510105412">drop table</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_en-us_topic_0108275424_li548061418543">into outfile</li></ul>
</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275324_li1517424293819">If the SQL statement is too long, the request fails to be delivered. If you continue to create a job, the system displays an error message indicating that the request is incorrect. In this case, you need to simplify or clear the SQL statement and try again.</li></ul>
</div></div>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p6220439735">select id,name from sqoop.user;</p>
</td>
</tr>
<tr id="dataartsstudio_01_0291__en-us_topic_0000001521121733_row3619943316154"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p621248516154">Schema/Tablespace</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p25123991165556">Name of the schema or tablespace from which data will be extracted. This parameter is displayed when <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b146623992633544">Use SQL Statement</strong> is set to <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b48150618933544">No</strong>. Click the icon next to the text box to go to the page for selecting a schema or directly enter a schema or tablespace.</p>
<p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p48984616164116">If the desired schema or tablespace is not displayed, check whether the login account has the permissions required to query metadata.</p>
<div class="note" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_note1969303595314"><span class="notetitle"> NOTE: </span><div class="notebody"><div class="p" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p57768350415">The parameter value can contain wildcard characters (*), which is used to export all databases whose names start with a certain prefix or end with a certain suffix. For example:<ul id="dataartsstudio_01_0291__en-us_topic_0000001521121733_ul15884133718419"><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_li288413724113"><strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b49473441533556">SCHEMA*</strong> indicates that all databases whose names starting with <span class="uicontrol" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_uicontrol162979243833556"><b>SCHEMA</b></span> are exported.</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_li18411188471"><strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b82974182733558">*SCHEMA</strong> indicates that all databases whose names ending with <span class="uicontrol" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_uicontrol45437455633558"><b>SCHEMA</b></span> are exported.</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_li977133418483"><strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b11210629133361">*SCHEMA</strong><strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b17071900703361">*</strong> indicates that all databases whose names containing <span class="uicontrol" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_uicontrol10895136163361"><b>SCHEMA</b></span> are exported.</li></ul>
</div>
</div></div>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p2503467416154">SCHEMA_E</p>
</td>
</tr>
<tr id="dataartsstudio_01_0291__en-us_topic_0000001521121733_row4012116315165"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p2858877215165">Table Name</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p6187019816562">Name of the table from which data will be extracted. This parameter is displayed when <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b10882823023365">Use SQL Statement</strong> is set to <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b17065997333365">No</strong>. Click the icon next to the text box to go to the page for selecting the table or directly enter a table name.</p>
<p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p49990086164128">If the desired table is not displayed, check whether the table exists or whether the login account has the permission to query metadata.</p>
<p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p1386724520614">This parameter can be configured as a macro variable of date and time and a path name can contain multiple macro variables. When the macro variable of date and time works with a scheduled job, the incremental data can be synchronized periodically. </p>
<div class="note" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_note13940218801"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_p52974484409">If you have configured a macro variable of date and time and schedule a CDM job through <span id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_text9997118203">DataArts Studio DataArts Factory</span>, the system replaces the macro variable of date and time with (<em id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_i799871152012">Planned start time of the data development job</em> <em id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_i0998101192020">Offset</em>) rather than (<em id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_i299821132018">Actual start time of the CDM job</em> <em id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_i129981917200">Offset</em>).</p>
</div></div>
<div class="note" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_note5966122551119"><span class="notetitle"> NOTE: </span><div class="notebody"><div class="p" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p2522183912523">The table name can contain wildcard characters (*), which is used to export all tables whose names start with a certain prefix or end with a certain suffix. The number and types of fields in the tables must be the same. The examples are as follows:<ul id="dataartsstudio_01_0291__en-us_topic_0000001521121733_ul12793194217522"><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_li2079344215522"><strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b204231627533623">table*</strong> indicates that all tables whose names starting with <span class="uicontrol" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_uicontrol134484735033623"><b>table</b></span> are exported.</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_li7991290534"><strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b57091811633625">*table</strong> indicates that all tables whose names ending with <span class="uicontrol" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_uicontrol12788299433625"><b>table</b></span> are exported.</li><li id="dataartsstudio_01_0291__en-us_topic_0000001521121733_li1999159155314"><strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b58380420333628">*table</strong><strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b14569708833628">*</strong> indicates that all tables whose names containing <span class="uicontrol" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_uicontrol29051480133628"><b>table</b></span> are exported.</li></ul>
</div>
</div></div>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p166427315165">table</p>
</td>
</tr>
<tr id="dataartsstudio_01_0291__en-us_topic_0000001521121733_row1497845915165"><td class="cellrowborder" rowspan="3" valign="top" width="12.03879612038796%" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p4617080315165">Advanced attributes</p>
<p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p42707312567"></p>
<p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p47612381316"></p>
</td>
<td class="cellrowborder" valign="top" width="14.378562143785622%" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p529563715165">Partition Column</p>
</td>
<td class="cellrowborder" valign="top" width="56.18438156184381%" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p5975823016568">This parameter is displayed when <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b11789781362314">Use SQL Statement</strong> is set to <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b110325006762314">No</strong>, indicating that a field used to split data during data extraction. CDM splits a job into multiple tasks based on this field and executes the tasks concurrently. Fields with data distributed evenly are used, such as the sequential number field.</p>
<p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p27142413114140">Click the icon next to the text box to go to the page for selecting a field or directly enter a field.</p>
<div class="note" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_note132821320114519"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p109081461185">The following types of partition columns are supported: TINYINT, SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, NUMERIC, DECIMAL, BIT, BOOLEAN, DATE, TIME, and TIMESTAMP. It is recommended that the partition column have an index.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" width="17.398260173982603%" headers="mcps1.3.2.2.5.1.4 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p3753014815165">id</p>
</td>
</tr>
<tr id="dataartsstudio_01_0291__en-us_topic_0000001521121733_row222701815165"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p8380964162021">WHERE Clause</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p26422060162021">WHERE clause used to specify the data extraction range. This parameter is displayed when <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b21889451033649">Use SQL Statement</strong> is set to <strong id="dataartsstudio_01_0291__en-us_topic_0000001521121733_b205098856833649">No</strong>. If this parameter is not set, the entire table is extracted.</p>
<p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p18740131613716">You can set a date macro variable to extract data generated on a specific date. </p>
<div class="note" id="dataartsstudio_01_0291__en-us_topic_0000001521121733_note45791757134910"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_p52974484409_1">If you have configured a macro variable of date and time and schedule a CDM job through <span id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_text9997118203_1">DataArts Studio DataArts Factory</span>, the system replaces the macro variable of date and time with (<em id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_i799871152012_1">Planned start time of the data development job</em> <em id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_i0998101192020_1">Offset</em>) rather than (<em id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_i299821132018_1">Actual start time of the CDM job</em> <em id="dataartsstudio_01_0291__en-us_topic_0000001521121733_en-us_topic_0108275319_i129981917200_1">Offset</em>).</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p60448746162021">DS='${dateformat(yyyy-MM-dd,-1,DAY)}'</p>
</td>
</tr>
<tr id="dataartsstudio_01_0291__en-us_topic_0000001521121733_row73857355113"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p153869311516">Null in Partition Column</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p83869319515">Whether the partition column can contain null values</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0291__en-us_topic_0000001521121733_p15386137518">Yes</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_01_0047.html">Configuring CDM Source Job Parameters</a></div>
</div>
</div>