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>
128 lines
18 KiB
HTML
128 lines
18 KiB
HTML
<a name="dataartsstudio_01_0068"></a><a name="dataartsstudio_01_0068"></a>
|
||
|
||
<h1 class="topictitle1">To MySQL/SQL Server/PostgreSQL</h1>
|
||
<div id="body8662426"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1030774719471"><a href="#dataartsstudio_01_0068__en-us_topic_0108275472_table1730435212914">Table 1</a> lists the destination job parameters when the destination link is an MySQL, SQL Server, or PostgreSQL link.</p>
|
||
|
||
<div class="tablenoborder"><a name="dataartsstudio_01_0068__en-us_topic_0108275472_table1730435212914"></a><a name="en-us_topic_0108275472_table1730435212914"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0068__en-us_topic_0108275472_table1730435212914" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row1130416528294"><th align="left" class="cellrowborder" valign="top" width="9.950000000000001%" id="mcps1.3.2.2.5.1.1"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p183041652112916">Category</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="11.59%" id="mcps1.3.2.2.5.1.2"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1304105210291">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="60.419999999999995%" id="mcps1.3.2.2.5.1.3"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p113041452112917">Description</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="18.04%" id="mcps1.3.2.2.5.1.4"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p16304105242913">Example Value</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row103045524298"><td class="cellrowborder" rowspan="6" valign="top" width="9.950000000000001%" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p33041052192911">Basic parameters</p>
|
||
<p id="dataartsstudio_01_0068__en-us_topic_0108275472_p63041252172910"></p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="11.59%" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p130420522299">Schema/Tablespace</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60.419999999999995%" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p133041152102915">Name of the database to which data will be written. The schema can be automatically created. Click the icon next to the text box to select a schema or tablespace.</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="18.04%" headers="mcps1.3.2.2.5.1.4 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p5304195212916">schema</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row530425262917"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p63059528297">Auto Table Creation</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><div class="p" id="dataartsstudio_01_0068__en-us_topic_0108275472_p63051752162912">This parameter is displayed only when the source is a relational database. The options are as follows:<ul id="dataartsstudio_01_0068__en-us_topic_0108275472_ul1730585217292"><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li19305135216298"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b84235270695756">Non-auto creation</strong>: CDM will not automatically create a table.</li><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li193052523291"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b84235270695832">Auto creation</strong>: If the destination database does not contain the table specified by <span class="parmname" id="dataartsstudio_01_0068__en-us_topic_0108275472_parmname1393810132155437"><b>Table Name</b></span>, CDM will automatically create the table. If the table specified by <span class="parmname" id="dataartsstudio_01_0068__en-us_topic_0108275472_parmname136853505353"><b>Table Name</b></span> already exists, no table is created and data is written to the existing table.</li><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li5305125214295"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b842352706155521">Deletion before creation</strong>: CDM deletes the table specified by <span class="parmname" id="dataartsstudio_01_0068__en-us_topic_0108275472_parmname517944180155536"><b>Table Name</b></span>, and then creates the table again.</li></ul>
|
||
</div>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p2305115252910">Non-auto creation</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row23051852142910"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p18305175217299">Table Name</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1330525212295">Name of the table to which data will be written. Click the icon next to the text box. The dialog box for selecting the table is displayed.</p>
|
||
<p id="dataartsstudio_01_0068__en-us_topic_0108275472_p173059524299">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_0068__en-us_topic_0108275472_note45791757134910"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_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_0068__en-us_topic_0108275472_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_0068__en-us_topic_0108275472_en-us_topic_0108275319_i799871152012">Planned start time of the data development job</em> – <em id="dataartsstudio_01_0068__en-us_topic_0108275472_en-us_topic_0108275319_i0998101192020">Offset</em>) rather than (<em id="dataartsstudio_01_0068__en-us_topic_0108275472_en-us_topic_0108275319_i299821132018">Actual start time of the CDM job</em> – <em id="dataartsstudio_01_0068__en-us_topic_0108275472_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_0068__en-us_topic_0108275472_p13305175292917">table</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row193057521292"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p143051952152912">Clear Data Before Import</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><div class="p" id="dataartsstudio_01_0068__en-us_topic_0108275472_p230515232919">Whether to clear the data in the destination table before data import. The options are as follows:<ul id="dataartsstudio_01_0068__en-us_topic_0108275472_ul33051852142915"><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li1530565292910"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b1183163015396">Do not clear</strong>: The data in the destination table is not cleared before data import. The imported data is just added to the table.</li><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li8305185252910"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b15142536103918">Clear all data</strong>: All data is cleared from the destination table before data import.</li><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li1530545282913"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b1697512405396">Clear part of data</strong>: Part of the data in the destination table is cleared before data import. If you select <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b39811405394">Clear part of data</strong>, you must configure <span class="parmname" id="dataartsstudio_01_0068__en-us_topic_0108275472_parmname1698134014398"><b>WHERE Clause</b></span> to specify which part will be deleted.</li></ul>
|
||
</div>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p3305175214297">Clear part of data</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row13305155292910"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1830518526293">WHERE Clause</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1130614529294">If <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b1625614445143">Clear Data Before Import</strong> is set to <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b1111410311513">Clear part of data</strong>, data in the destination table will be deleted based on the WHERE clause after the configuration is complete and before the import starts.</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p17306115252920">age > 18 and age <= 60</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row1030615526293"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1130615213291">Constraint Conflict Handling</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1430625272916">How to handle data conflicts when data is being imported to RDS for MySQL</p>
|
||
<ul id="dataartsstudio_01_0068__en-us_topic_0108275472_ul1430645212295"><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li4306195232913"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b1342019599197">insert into</strong>: When a primary key or unique index conflict occurs, data cannot be written and will become dirty data.</li><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li14306165214290"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b126181333132017">replace into</strong>: When a primary key or unique index conflict occurs, the original row is deleted and a new row is inserted to replace all the fields in the original row.</li><li id="dataartsstudio_01_0068__en-us_topic_0108275472_li20306185212295"><strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b15914143152117">on duplicate key update</strong>: When a primary key or unique index conflict occurs in a row in the destination table, the data columns except the unique constraint column in this row are updated.</li></ul>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p3306175217298">insert into</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row2030675214293"><td class="cellrowborder" rowspan="6" valign="top" width="9.950000000000001%" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p133064528296">Advanced parameters</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="11.59%" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p830718523297">Import to Staging Table</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60.419999999999995%" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p5307052192910">If you set this parameter to <span class="parmvalue" id="dataartsstudio_01_0068__en-us_topic_0108275472_parmvalue5196617105520"><b>Yes</b></span>, the transaction mode is enabled. CDM automatically creates a temporary table and imports data to the temporary table. After the data is imported successfully, it is migrated to the destination table in transaction mode. If the import fails, the destination table is rolled back to the state before the job starts. </p>
|
||
<p id="dataartsstudio_01_0068__en-us_topic_0108275472_p03074527299">The default value is <span class="parmvalue" id="dataartsstudio_01_0068__en-us_topic_0108275472_parmvalue8204168115116"><b>No</b></span>, indicating that CDM directly imports the data to the destination table. In this case, if the job fails to be executed, the data that has been imported to the destination table will not be rolled back automatically.</p>
|
||
<div class="note" id="dataartsstudio_01_0068__en-us_topic_0108275472_note33071052182917"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_en-us_topic_0108275316_p938012916819">If you select <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_en-us_topic_0108275316_b56871248124819">Clear part of data</strong> or <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_en-us_topic_0108275316_b87505104914">Clear all data</strong> for <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_en-us_topic_0108275316_b394614371412">Clear Data Before Import</strong>, CDM does not roll back the deleted data in transaction mode.</p>
|
||
</div></div>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="18.04%" headers="mcps1.3.2.2.5.1.4 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p3307152162911">No</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row63072529290"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p10307155292916">Extend Field Length</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p11307135217294">When <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b857428185619">Auto creation</strong> is selected, the length of the character fields can be extended to three times the original length and then written to the destination table. If the encoding types of the source and destination databases are different, but the character fields in the source and destination tables are the same, errors may occur during data migration due to character length difference.</p>
|
||
<div class="note" id="dataartsstudio_01_0068__en-us_topic_0108275472_note63077527299"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p2030795252918">When this function is enabled, some fields consume three times the storage space of the user.</p>
|
||
</div></div>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1930713527291">No</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row1330716527293"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p14307752132919">Use NOT NULL Constraint</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1308652112913">If you choose to create a target table automatically and specify the NOT NULL constraint, keep the NOT NULL constraints of the source and target tables consistent.</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p2308052112918">Yes</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row1830805272911"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p16308205272914">Prepare for Data Import</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p13081152132919">The SQL statement that is first executed before a task is executed. Currently, only one SQL statement can be executed in wizard mode.</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p17308252102916">create temp table</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row1630895262919"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p103081452202911">Complete Statement After Data Import</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p16308125210291">The SQL statement that is executed after a task is executed. Currently, only one SQL statement can be executed.</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p23089527296">merge into</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="dataartsstudio_01_0068__en-us_topic_0108275472_row14148057258"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p9244220259">Loader Threads</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p192442202515">Number of threads started in each loader. A larger number allows more concurrent write operations.</p>
|
||
<div class="note" id="dataartsstudio_01_0068__en-us_topic_0108275472_note424122202515"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p13241422102516">This parameter is unavailable if <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b14801810585">Constraint Conflict Handling</strong> is set to <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b127771935135814">replace into</strong> or <strong id="dataartsstudio_01_0068__en-us_topic_0108275472_b18123104525812">on duplicate key update</strong>.</p>
|
||
</div></div>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="dataartsstudio_01_0068__en-us_topic_0108275472_p1024192215255">1</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_01_0061.html">Configuring CDM Destination Job Parameters</a></div>
|
||
</div>
|
||
</div>
|
||
|