forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
81 lines
10 KiB
HTML
81 lines
10 KiB
HTML
<a name="mrs_01_1148"></a><a name="mrs_01_1148"></a>
|
|
|
|
<h1 class="topictitle1">Table Output </h1>
|
|
<div id="body8662426"><div class="section" id="mrs_01_1148__en-us_topic_0000001219149691_s27f6aaa3c92e49bf8e7bd9cc1243d946"><h4 class="sectiontitle">Overview</h4><p id="mrs_01_1148__en-us_topic_0000001219149691_ac68134c0c37d47fb8d38fee9d3f89ae2">The <span class="parmname" id="mrs_01_1148__en-us_topic_0000001219149691_pdfa5bba0609a401a8794bd141659f593"><b>Table Output</b></span> operator exports output fields to specified columns in a relational database table.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1148__en-us_topic_0000001219149691_sc42531b5963e485cb8b6568df12e479b"><h4 class="sectiontitle">Input and Output</h4><ul id="mrs_01_1148__en-us_topic_0000001219149691_u82045a8cd274427d8d23d0f611bf0e01"><li id="mrs_01_1148__en-us_topic_0000001219149691_le119aa1299bc42d1946fb065469ff28b">Input: fields to be exported</li><li id="mrs_01_1148__en-us_topic_0000001219149691_lebf4c05bd44e4f04af5d586b99a109a6">Output: relational database table</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1148__en-us_topic_0000001219149691_s6bac61712f544cc3b50b8b4ae4eb6012"><h4 class="sectiontitle">Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1148__en-us_topic_0000001219149691_t21fe5f85c32b4122a4833bcc316d642d" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Operator parameters description</caption><thead align="left"><tr id="mrs_01_1148__en-us_topic_0000001219149691_r2359d67ff30c4943b3aa507de8ae5db0"><th align="left" class="cellrowborder" valign="top" width="18.37%" id="mcps1.3.3.2.2.6.1.1"><p id="mrs_01_1148__en-us_topic_0000001219149691_ac973d97e61424d34b7c89c7ff968441f">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54.730000000000004%" id="mcps1.3.3.2.2.6.1.2"><p id="mrs_01_1148__en-us_topic_0000001219149691_a65f043dcff45410fbff0a055e2de8145"><strong id="mrs_01_1148__en-us_topic_0000001219149691_b108782730691954">Description</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.3.3.2.2.6.1.3"><p id="mrs_01_1148__en-us_topic_0000001219149691_a4d526f401dc647c78581f5e59e2116e6">Node Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.69%" id="mcps1.3.3.2.2.6.1.4"><p id="mrs_01_1148__en-us_topic_0000001219149691_a90336f15d28142f6aad2f149d17a6d99">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.69%" id="mcps1.3.3.2.2.6.1.5"><p id="mrs_01_1148__en-us_topic_0000001219149691_a6945e19bbc164df5b95215fbfd02552b">Default Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1148__en-us_topic_0000001219149691_row663861152912"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p96391818293">Output delimiter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p13639410294">Delimiter.</p>
|
|
<div class="note" id="mrs_01_1148__en-us_topic_0000001219149691_ne3f39bb11c584024b176d8566e242fbc"><span class="notetitle"> NOTE: </span><div class="notebody"><p class="text" id="mrs_01_1148__en-us_topic_0000001219149691_p17933553563">This configuration applies only to the MySQL dedicated connector. If the data column content contains the default delimiter, you need to set a user-defined delimiter. Otherwise, data disorder may occur.</p>
|
|
</div></div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p163912119294">string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p9640181172911">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p66407132919">,</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1148__en-us_topic_0000001219149691_row186251183297"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p562578142914">Line delimiter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p26253872912">Line delimiter, which can be any string specified by users based on the actual situation. Any character string is supported. The OS line delimiter is used by default.</p>
|
|
<div class="note" id="mrs_01_1148__en-us_topic_0000001219149691_note17764215367"><span class="notetitle"> NOTE: </span><div class="notebody"><p class="text" id="mrs_01_1148__en-us_topic_0000001219149691_p783998155611">This configuration applies only to the MySQL dedicated connector. If the data column content contains the default delimiter, you need to set a user-defined delimiter. Otherwise, data disorder may occur.</p>
|
|
</div></div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p962519814295">string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p1962514818297">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1148__en-us_topic_0000001219149691_p1162528192916">\n</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1148__en-us_topic_0000001219149691_r3d0a70c5a74d458fa299b801fdf5f2f4"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1148__en-us_topic_0000001219149691_a68e19c50b51b4636b24902cdb34f284f">Output fields</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1148__en-us_topic_0000001219149691_ab18ebbfa977c4975980daa28b60d569f">Information about relational database output fields:</p>
|
|
<ul id="mrs_01_1148__en-us_topic_0000001219149691_u8f0fed1be93d402897dd97727a0a26d9"><li id="mrs_01_1148__en-us_topic_0000001219149691_la7c96c16995f4848adb31f2d541c33e7">field name: Names of output fields.</li><li id="mrs_01_1148__en-us_topic_0000001219149691_lbb6502a10711442390eac75f7cc04e57">table column name: Names of database table columns.</li><li id="mrs_01_1148__en-us_topic_0000001219149691_l986ea68ddc4042e29a276a8f2ab00d74">type: Field type. The value must be consistent with the field type configured in the database.</li><li id="mrs_01_1148__en-us_topic_0000001219149691_l0cd2f2c118ad4174af9ba7bb517bcb8d">length: Field value length. If the actual field value is excessively long, the value is cut based on the configured length. When <span class="parmname" id="mrs_01_1148__en-us_topic_0000001219149691_parmname1281519205228"><b>type</b></span> is set to <span class="parmvalue" id="mrs_01_1148__en-us_topic_0000001219149691_parmvalue38211820202213"><b>CHAR</b></span>, spaces are added to the field value for supplement if the actual field value length is less than the configured length. When <span class="parmname" id="mrs_01_1148__en-us_topic_0000001219149691_parmname78218201226"><b>type</b></span> is set to <span class="parmvalue" id="mrs_01_1148__en-us_topic_0000001219149691_parmvalue58211720182215"><b>VARCHAR</b></span>, no space is added to the field value for supplement if the actual field value length is less than the configured length.</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1148__en-us_topic_0000001219149691_ae59cf8c175d84a14a5e655b817e10709">map</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1148__en-us_topic_0000001219149691_a3ec8673afea142f6a3d33edb699a78d4">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1148__en-us_topic_0000001219149691_a277ce6ec450344c3a9f2888e7a683c2c">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1148__en-us_topic_0000001219149691_s8252e54c89fc404ab63b73f278618e93"><h4 class="sectiontitle">Data Processing Rule</h4><p id="mrs_01_1148__en-us_topic_0000001219149691_a02646e481a894de4ac1d3ba9edadccdc">The field values are exported to the table.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1148__en-us_topic_0000001219149691_s35051ea3e1d34726a7839bd536bbb94f"><h4 class="sectiontitle">Example</h4><p id="mrs_01_1148__en-us_topic_0000001219149691_a415836cd7aef4c9ebd1e236218f93acd">Use the data export from HBase to sqlserver2014 as an example.</p>
|
|
<p id="mrs_01_1148__en-us_topic_0000001219149691_af98eb0b818d046419db8c026fdcec905">In sqlserver2014, run the following statement to create an empty data test_1 for storing HBase data. Run the following statement:</p>
|
|
<p id="mrs_01_1148__en-us_topic_0000001219149691_a311a3bcc076e4d56be8e5de40c4370a0"><strong id="mrs_01_1148__en-us_topic_0000001219149691_a752c779d278948a797d49b2a6e49b05e">create table test_1 (id int, name text, value text);</strong></p>
|
|
<p id="mrs_01_1148__en-us_topic_0000001219149691_a2ca9b7e22318475c9cb4f4b6bb7f0f38">Use the HBase Input operator to generated three fields A, B, and C.</p>
|
|
<p id="mrs_01_1148__en-us_topic_0000001219149691_acedf871a2ac84944a7c6201f37429104">Use the <span class="parmname" id="mrs_01_1148__en-us_topic_0000001219149691_p331497f1c0704cc8a76650d57835dc7d"><b>Table Output</b></span> operator to export A, B, and C to the test_1 table.</p>
|
|
<p id="mrs_01_1148__en-us_topic_0000001219149691_af1123bfb0a0e41eb8c9fca444901194b"><span><img id="mrs_01_1148__en-us_topic_0000001219149691_image9196174444819" src="en-us_image_0000001296060012.png"></span></p>
|
|
<p id="mrs_01_1148__en-us_topic_0000001219149691_a618d8d148f034124850532c9af7745c0">The command output is as follows:</p>
|
|
<p id="mrs_01_1148__en-us_topic_0000001219149691_p1462144614325"><span><img id="mrs_01_1148__en-us_topic_0000001219149691_image12621146163216" src="en-us_image_0000001348740037.jpg"></span></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1145.html">Output Operators</a></div>
|
|
</div>
|
|
</div>
|
|
|