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

64 lines
11 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_1256"></a><a name="dataartsstudio_01_1256"></a>
<h1 class="topictitle1">From a Database Shard</h1>
<div id="body8662426"><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p8807117135015">If the source link of a job is a <a href="dataartsstudio_01_1214.html">database shard link</a>, configure the source job parameters based on <a href="#dataartsstudio_01_1256__en-us_topic_0000001271203792_table9481013111615">Table 1</a>.</p>
<div class="tablenoborder"><a name="dataartsstudio_01_1256__en-us_topic_0000001271203792_table9481013111615"></a><a name="en-us_topic_0000001271203792_table9481013111615"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_1256__en-us_topic_0000001271203792_table9481013111615" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dataartsstudio_01_1256__en-us_topic_0000001271203792_row114817131169"><th align="left" class="cellrowborder" valign="top" width="12.03879612038796%" id="mcps1.3.2.2.5.1.1"><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p194912132165">Category</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.36856314368563%" id="mcps1.3.2.2.5.1.2"><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p74971321620">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.19438056194382%" id="mcps1.3.2.2.5.1.3"><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p104913139169">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_1256__en-us_topic_0000001271203792_p1449413141618">Example Value</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_1256__en-us_topic_0000001271203792_row74981312166"><td class="cellrowborder" rowspan="2" valign="top" width="12.03879612038796%" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p249181341617">Basic parameters</p>
</td>
<td class="cellrowborder" valign="top" width="14.36856314368563%" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p144941361615">Schema/Tablespace</p>
</td>
<td class="cellrowborder" valign="top" width="56.19438056194382%" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p174919136165">Indicates the name of the schema or tablespace from which data is to be extracted. Click the icon next to the text box to go to the page for selecting a schema or tablespace. During a sharded link job, the tablespace corresponding to the first backend link is displayed by default. You can also enter a schema or tablespace name.</p>
<p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p1549213121610">If the desired schema or tablespace is not displayed, check whether the login account has the permissions required to query metadata.</p>
<p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p1386545353610">This parameter can be set to a regular expression to export all databases that meet the rule. For example, if <strong id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0000001271229018_b3236132015476">Table Name</strong> is set to <i><span class="varname" id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0000001271229018_varname16516175317348">user_[0-9]{1,2}</span></i>, tables from <strong id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0000001271229018_b532833014718">user_0</strong> to <strong id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0000001271229018_b1776803413473">user_9</strong> and from <strong id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0000001271229018_b439883810471">user_00</strong> to <strong id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0000001271229018_b145461941124713">user_99</strong> are matched.</p>
</td>
<td class="cellrowborder" valign="top" width="17.398260173982603%" headers="mcps1.3.2.2.5.1.4 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p134921316160">SCHEMA_E</p>
</td>
</tr>
<tr id="dataartsstudio_01_1256__en-us_topic_0000001271203792_row14919139160"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p149213131612">Table Name</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p349181361615">Indicates the name of the table from which data is to be extracted. 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_1256__en-us_topic_0000001271203792_p2049191381613">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_1256__en-us_topic_0000001271203792_p442120712915">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>
<p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p182773733919">This parameter can be set to a regular expression to export all databases that meet the rule.</p>
<div class="note" id="dataartsstudio_01_1256__en-us_topic_0000001271203792_note6558775112"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_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_1256__en-us_topic_0000001271203792_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_1256__en-us_topic_0000001271203792_en-us_topic_0108275319_i799871152012">Planned start time of the data development job</em> <em id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0108275319_i0998101192020">Offset</em>) rather than (<em id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0108275319_i299821132018">Actual start time of the CDM job</em> <em id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0108275319_i129981917200">Offset</em>).</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p204951301613">table</p>
</td>
</tr>
<tr id="dataartsstudio_01_1256__en-us_topic_0000001271203792_row19501813141614"><td class="cellrowborder" valign="top" width="12.03879612038796%" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p11981122442512">Advanced attributes</p>
</td>
<td class="cellrowborder" valign="top" width="14.36856314368563%" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p20501013131617">WHERE Clause</p>
</td>
<td class="cellrowborder" valign="top" width="56.19438056194382%" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p1350201311164">Specifies the data extraction range. If this parameter is not set, the entire table is extracted.</p>
<p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_p1957552142814">You can set a date macro variable to extract data generated on a specific date. </p>
<div class="note" id="dataartsstudio_01_1256__en-us_topic_0000001271203792_note45791757134910"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_1256__en-us_topic_0000001271203792_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_1256__en-us_topic_0000001271203792_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_1256__en-us_topic_0000001271203792_en-us_topic_0108275319_i799871152012_1">Planned start time of the data development job</em> <em id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0108275319_i0998101192020_1">Offset</em>) rather than (<em id="dataartsstudio_01_1256__en-us_topic_0000001271203792_en-us_topic_0108275319_i299821132018_1">Actual start time of the CDM job</em> <em id="dataartsstudio_01_1256__en-us_topic_0000001271203792_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_1256__en-us_topic_0000001271203792_p05031331619">DS='${dateformat(yyyy-MM-dd,-1,DAY)}'</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="dataartsstudio_01_1256__en-us_topic_0000001271203792_note3941141732917"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dataartsstudio_01_1256__en-us_topic_0000001271203792_ul17941717202919"><li id="dataartsstudio_01_1256__en-us_topic_0000001271203792_li6942017132917">If the <strong id="dataartsstudio_01_1256__en-us_topic_0000001271203792_b197320311275">Source Link Name</strong> is the backend link of the sharded link, the job is a common MySQL job.</li><li id="dataartsstudio_01_1256__en-us_topic_0000001271203792_li4579162023113">When creating a job whose source end is a sharded link, you can add a custom field with the sample value of <strong id="dataartsstudio_01_1256__en-us_topic_0000001271203792_b146020719277">${custom(host)}</strong> to the source field during field mapping. This field is used to view the data source of the table after the data of multiple tables across databases is migrated to the same table. The following sample values are supported:<ul id="dataartsstudio_01_1256__en-us_topic_0000001271203792_ul1441514623611"><li id="dataartsstudio_01_1256__en-us_topic_0000001271203792_li773164511369">${custom(host)}</li><li id="dataartsstudio_01_1256__en-us_topic_0000001271203792_li14731245133617">${custom(database)}</li><li id="dataartsstudio_01_1256__en-us_topic_0000001271203792_li1174194533611">${custom(fromLinkName)}</li><li id="dataartsstudio_01_1256__en-us_topic_0000001271203792_li4741445153620">${custom(schemaName)}</li><li id="dataartsstudio_01_1256__en-us_topic_0000001271203792_li1475194563611">${custom(tableName)}</li></ul>
</li></ul>
</div></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>