forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Xiong, Chen Xiao <chenxiaoxiong@huawei.com> Co-committed-by: Xiong, Chen Xiao <chenxiaoxiong@huawei.com>
174 lines
16 KiB
HTML
174 lines
16 KiB
HTML
<a name="dataartsstudio_02_0296"></a><a name="dataartsstudio_02_0296"></a>
|
|
|
|
<h1 class="topictitle1">To a Relational Database</h1>
|
|
<div id="body8662426"><div class="section" id="dataartsstudio_02_0296__en-us_topic_0108272852_section33401108172339"><h4 class="sectiontitle">Sample JSON File</h4><pre class="screen" id="dataartsstudio_02_0296__en-us_topic_0108272852_screen3995055395736">"to-config-values": {
|
|
"configs": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"name": "toJobConfig.schemaName",
|
|
"value": "cdm"
|
|
},
|
|
{
|
|
"name": "toJobConfig.tablePreparation",
|
|
"value": "DROP_AND_CREATE"
|
|
},
|
|
{
|
|
"name": "toJobConfig.tableName",
|
|
"value": "rf_to"
|
|
},
|
|
{
|
|
"name": "toJobConfig.columnList",
|
|
"value": "id&gid&name"
|
|
},
|
|
{
|
|
"name": "toJobConfig.isCompress",
|
|
"value": "false"
|
|
},
|
|
{
|
|
"name": "toJobConfig.orientation",
|
|
"value": "ROW"
|
|
},
|
|
{
|
|
"name": "toJobConfig.useStageTable",
|
|
"value": "false"
|
|
},
|
|
{
|
|
"name": "toJobConfig.shouldClearTable",
|
|
"value": "false"
|
|
},
|
|
{
|
|
"name": "toJobConfig.extendCharLength",
|
|
"value": "false"
|
|
}
|
|
],
|
|
"name": "toJobConfig"
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dataartsstudio_02_0296__en-us_topic_0108272852_section5786459916646"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_02_0296__en-us_topic_0108272852_table13922888141527" frame="border" border="1" rules="all"><thead align="left"><tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row229143141527"><th align="left" class="cellrowborder" valign="top" width="21.72%" id="mcps1.3.2.2.1.5.1.1"><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p66756185141527">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.91%" id="mcps1.3.2.2.1.5.1.2"><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p38541938141527">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.23%" id="mcps1.3.2.2.1.5.1.3"><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p34889279141527">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40.14%" id="mcps1.3.2.2.1.5.1.4"><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p7459369141527">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row62628929141527"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p18560626141527">toJobConfig.schemaName</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p27015713141527">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p50167516142856">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p2430205141527">Database mode or tablespace</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row77814039594"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p263138989594">toJobConfig.tablePreparation</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p510510189594">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p414918119594">Enumeration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><div class="p" id="dataartsstudio_02_0296__en-us_topic_0108272852_p2035898817235">This parameter is available only when both the source and destination databases are relational databases. The options for data write to tables are as follows:<ul id="dataartsstudio_02_0296__en-us_topic_0108272852_ul12109569172733"><li id="dataartsstudio_02_0296__en-us_topic_0108272852_li14533016172733"><strong id="dataartsstudio_02_0296__en-us_topic_0108272852_b842352706145556">DO_NOTHING</strong>: Do not create the table automatically.</li><li id="dataartsstudio_02_0296__en-us_topic_0108272852_li53925670172753"><strong id="dataartsstudio_02_0296__en-us_topic_0108272852_b84235270614564">CREATE_WHEN_NOT_EXIST</strong>: If the destination database does not contain the table specified by <span class="parmname" id="dataartsstudio_02_0296__en-us_topic_0108272852_parmname2039722420145628"><b>tableName</b></span>, CDM automatically creates the table.</li><li id="dataartsstudio_02_0296__en-us_topic_0108272852_li50321643172810"><strong id="dataartsstudio_02_0296__en-us_topic_0108272852_b842352706145647">DROP_AND_CREATE</strong>: Delete the table specified by <span class="parmname" id="dataartsstudio_02_0296__en-us_topic_0108272852_parmname622152351145658"><b>tableName</b></span>, and then create the table again.</li></ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row42094113141527"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p26789449141527">toJobConfig.tableName</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p22461756141527">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p7462956141527">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p3618065012348">Name of the table to which data is written</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row8336449141527"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p29681527141527">toJobConfig.columnList</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p55393515141527">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p57689731141527">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p42356648141527">List of fields to be loaded. Use <span class="parmvalue" id="dataartsstudio_02_0296__en-us_topic_0108272852_parmvalue361045875114827"><b>&</b></span> to separate field names. For example, <span class="parmvalue" id="dataartsstudio_02_0296__en-us_topic_0108272852_parmvalue1597360760113647"><b>id&gid&name</b></span>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row1814291644"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p111569641">toJobConfig.beforeImportType</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p12304858847">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p16151791045">Enumeration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><div class="p" id="dataartsstudio_02_0296__en-us_topic_0108272852_p15435125215266">Whether to clear the data in the target table before data import. The options are as follows:<ul id="dataartsstudio_02_0296__en-us_topic_0108272852_ul944616526261"><li id="dataartsstudio_02_0296__en-us_topic_0108272852_li644645217269"><strong id="dataartsstudio_02_0296__en-us_topic_0108272852_b34715181178">none</strong>: Do not clear the data in the target table before data import but append data to the table.</li><li id="dataartsstudio_02_0296__en-us_topic_0108272852_li1544625215265"><strong id="dataartsstudio_02_0296__en-us_topic_0108272852_b9110830481">shouldClearTable</strong>: Clear the data in the target table before data import.</li><li id="dataartsstudio_02_0296__en-us_topic_0108272852_li9446105215265"><strong id="dataartsstudio_02_0296__en-us_topic_0108272852_b15815195917814">whereClause</strong>: To clear data in the target table based on the WHERE clause, set the <span class="parmname" id="dataartsstudio_02_0296__en-us_topic_0108272852_parmname1244625222619"><b>toJobConfig.whereClause</b></span> parameter. CDM deletes the data from the target table as specified.</li></ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row1056324814512"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p2056412481857">toJobConfig.whereClause</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p8564204812516">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p1997711416357">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p65641481254">WHERE clause used to delete data from the target table before data import</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row4541501110755"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p5473728910755">toJobConfig.orientation</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p453543110755">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p3182567010755">Enumeration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p2774251010755">Storage mode. This parameter is enabled only for the DWS database. When the DWS database table needs to be automatically created, the optional data storage modes of the table are as follows:</p>
|
|
<ul id="dataartsstudio_02_0296__en-us_topic_0108272852_ul57562439101357"><li id="dataartsstudio_02_0296__en-us_topic_0108272852_li29809845101357"><strong id="dataartsstudio_02_0296__en-us_topic_0108272852_b842352706162050">ROW</strong>: Data in the table is stored in rows.</li><li id="dataartsstudio_02_0296__en-us_topic_0108272852_li50033226101447"><strong id="dataartsstudio_02_0296__en-us_topic_0108272852_b842352706162110">COLUMN</strong>: Data in the table is stored in columns.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row4106567101537"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p64196535101537">toJobConfig.isCompress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p28196201101628">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p18240297101537">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p1069050101537">Whether to perform compression. This parameter is enabled only for the DWS database. When the DWS database table needs to be automatically created, you can specify whether to store the data in the table after compression.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row113421356190"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p2029796110535">toJobConfig.useStageTable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p3352214310535">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p3093903310535">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p2303372710535">Whether to import data to the phase table first. If this parameter is set to <span class="parmvalue" id="dataartsstudio_02_0296__en-us_topic_0108272852_parmvalue427879913162446"><b>true</b></span>, the data is imported to the phase table before it is imported to the destination table. After the data is successfully imported to the phase table, it is then imported from the phase table to the destination table. In this way, the data that is successfully imported to the destination table remains in case the data import fails.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row8411582101850"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p10249514101850">toJobConfig.extendCharLength</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p24904331101850">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p3984969101850">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p54347083101850">Whether to extend the length of the character string field. If this parameter is set to <span class="parmvalue" id="dataartsstudio_02_0296__en-us_topic_0108272852_parmvalue1012238876162821"><b>true</b></span>, the length of the character string field in the destination table is three times the length of the corresponding field in the source table when the destination table needs to be automatically created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_02_0296__en-us_topic_0108272852_row1868435413412"><td class="cellrowborder" valign="top" width="21.72%" headers="mcps1.3.2.2.1.5.1.1 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p1684185454120">toJobConfig.useNullable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.91%" headers="mcps1.3.2.2.1.5.1.2 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p574414144219">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.23%" headers="mcps1.3.2.2.1.5.1.3 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p11745113421">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.2.2.1.5.1.4 "><p id="dataartsstudio_02_0296__en-us_topic_0108272852_p240712364010">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>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="destination_job_parameters.html">Destination Job Parameters</a></div>
|
|
</div>
|
|
</div>
|
|
|