forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com> Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
93 lines
18 KiB
HTML
93 lines
18 KiB
HTML
<a name="dataartsstudio_01_0388"></a><a name="dataartsstudio_01_0388"></a>
|
||
|
||
<h1 class="topictitle1">From SAP HANA</h1>
|
||
<div id="body8662426"><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p8807117135015"><a href="#dataartsstudio_01_0388__en-us_topic_0000001452278957_table5046103815165">Table 1</a> lists the job parameters when the source link is a SAP HANA link.</p>
|
||
|
||
<div class="tablenoborder"><a name="dataartsstudio_01_0388__en-us_topic_0000001452278957_table5046103815165"></a><a name="en-us_topic_0000001452278957_table5046103815165"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_table5046103815165" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dataartsstudio_01_0388__en-us_topic_0000001452278957_row585315215165"><th align="left" class="cellrowborder" valign="top" width="12.03879612038796%" id="mcps1.3.2.2.5.1.1"><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_p482921015165">Example Value</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="dataartsstudio_01_0388__en-us_topic_0000001452278957_row14855115919313"><td class="cellrowborder" rowspan="4" valign="top" width="12.03879612038796%" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_p1685510591937">No</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0388__en-us_topic_0000001452278957_row1122012394320"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p92201739139">SQL Statement</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p5220739135">When <span class="parmname" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_parmname196694233091355"><b>Use SQL Statement</b></span> is set to <span class="parmvalue" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_parmvalue63855756891355"><b>Yes</b></span>, enter an SQL statement here. CDM exports data based on the SQL statement.</p>
|
||
<div class="note" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_note1624112587564"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_ul95781925125319"><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_b143067633772251">select * from table a; select * from table b</strong>.</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_li115789258538">With statements are not supported.</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_li15578152525319">Comments, such as <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_b148619239372251">--</strong> and <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_b187717313372251">/*</strong>, are not supported.</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_ul185084210539"><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_li1623929145315">load data</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_li15832356155310">delete from</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_li144890175411">alter table</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_li17896205419">create table</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_li7715510105412">drop table</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_en-us_topic_0108275424_li548061418543">into outfile</li></ul>
|
||
</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_p6220439735">select id,name from sqoop.user;</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0388__en-us_topic_0000001452278957_row3619943316154"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p621248516154">Schema/Tablespace</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p25123991165556">Name of the schema or tablespace from which data will be extracted. This parameter is displayed when <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b8174199799148">Use SQL Statement</strong> is set to <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b16841048759148">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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_note1969303595314"><span class="notetitle"> NOTE: </span><div class="notebody"><div class="p" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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. Examples:<ul id="dataartsstudio_01_0388__en-us_topic_0000001452278957_ul15884133718419"><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_li288413724113"><strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b87272715191418">SCHEMA*</strong> indicates that all databases whose names starting with <span class="uicontrol" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_uicontrol39411751591418"><b>SCHEMA</b></span> are exported.</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_li18411188471"><strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b99998947191420">*SCHEMA</strong> indicates that all databases whose names ending with <span class="uicontrol" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_uicontrol87452955091420"><b>SCHEMA</b></span> are exported.</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_li977133418483"><strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b31356437791422">*SCHEMA</strong><strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b156150530891422">*</strong> indicates that all databases whose names containing <span class="uicontrol" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_uicontrol94827529091422"><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_0388__en-us_topic_0000001452278957_p2503467416154">SCHEMA_E</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0388__en-us_topic_0000001452278957_row4012116315165"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p2858877215165">Table Name</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p6187019816562">Name of the table from which data will be extracted. This parameter is displayed when <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b8721061391427">Use SQL Statement</strong> is set to <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b22932214391427">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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_note13940218801"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_en-us_topic_0108275319_i799871152012">Planned start time of the data development job</em> – <em id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275319_i0998101192020">Offset</em>) rather than (<em id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275319_i299821132018">Actual start time of the CDM job</em> – <em id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275319_i129981917200">Offset</em>).</p>
|
||
</div></div>
|
||
<div class="note" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_note5966122551119"><span class="notetitle"> NOTE: </span><div class="notebody"><div class="p" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_ul12793194217522"><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_li2079344215522"><strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b30316471091454">table*</strong> indicates that all tables whose names starting with <span class="uicontrol" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_uicontrol44986820691454"><b>table</b></span> are exported.</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_li7991290534"><strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b109788309091456">*table</strong> indicates that all tables whose names ending with <span class="uicontrol" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_uicontrol158394946191456"><b>table</b></span> are exported.</li><li id="dataartsstudio_01_0388__en-us_topic_0000001452278957_li1999159155314"><strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b23938108191459">*table</strong><strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b103431386391459">*</strong> indicates that all tables whose names containing <span class="uicontrol" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_uicontrol167163967091459"><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_0388__en-us_topic_0000001452278957_p166427315165">table</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0388__en-us_topic_0000001452278957_row222701815165"><td class="cellrowborder" rowspan="2" valign="top" width="12.03879612038796%" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p105916107481">Advanced attributes</p>
|
||
<p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p11336141655416"></p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="14.378562143785622%" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p8380964162021">WHERE Clause</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="56.18438156184381%" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p26422060162021">WHERE clause used to specify the data extraction range. This parameter is displayed when <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b20703175149156">Use SQL Statement</strong> is set to <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_b2944995849156">No</strong>. If this parameter is not set, the entire table is extracted.</p>
|
||
<p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p18740131613716">You can set a date macro variable to extract data generated on a specific date. </p>
|
||
<div class="note" id="dataartsstudio_01_0388__en-us_topic_0000001452278957_note45791757134910"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_en-us_topic_0108275319_i799871152012_1">Planned start time of the data development job</em> – <em id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275319_i0998101192020_1">Offset</em>) rather than (<em id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275319_i299821132018_1">Actual start time of the CDM job</em> – <em id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275319_i129981917200_1">Offset</em>).</p>
|
||
</div></div>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="17.398260173982603%" headers="mcps1.3.2.2.5.1.4 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p60448746162021">DS='${dateformat(yyyy-MM-dd,-1,DAY)}'</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0388__en-us_topic_0000001452278957_row13336131612543"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p1833611164546">Partition Column</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p5975823016568">This parameter is displayed when <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0000001271229018_b1352614714715">Use SQL Statement</strong> is set to <strong id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0000001271229018_b15526947571">No</strong>, indicating 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_0388__en-us_topic_0000001452278957_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_0388__en-us_topic_0000001452278957_note132821320114519"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_en-us_topic_0108275324_p7333732122920">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" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0388__en-us_topic_0000001452278957_p1533641615416">id</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>
|
||
|