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>
76 lines
9.0 KiB
HTML
76 lines
9.0 KiB
HTML
<a name="mrs_01_1136"></a><a name="mrs_01_1136"></a>
|
|
|
|
<h1 class="topictitle1">Extract Fields</h1>
|
|
<div id="body8662426"><div class="section" id="mrs_01_1136__en-us_topic_0000001173949384_s42116ed505464857a6b4b3fae9ce982d"><h4 class="sectiontitle">Overview</h4><p id="mrs_01_1136__en-us_topic_0000001173949384_abe483499cffb452abbd04032662f9a46">The <span class="parmname" id="mrs_01_1136__en-us_topic_0000001173949384_pf52d71c2fa6d4263976aaff4a5ebac42"><b>Extract Fields</b></span> separates an existing field by using delimiters to generate new fields.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1136__en-us_topic_0000001173949384_s4539ad8d8c164316b88aec3dafac9130"><h4 class="sectiontitle">Input and Output</h4><ul id="mrs_01_1136__en-us_topic_0000001173949384_u67cbd7e8f9af4995b41baaafc8a3e59b"><li id="mrs_01_1136__en-us_topic_0000001173949384_ldeaffb0df67042ec8ffc1a04ce132008">Input: field to be separated</li><li id="mrs_01_1136__en-us_topic_0000001173949384_lad213715faee41198edb1eb1829b830b">Output: new fields</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1136__en-us_topic_0000001173949384_scbe9dec8d1da4b76a53e70adb0dc780b"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1136__en-us_topic_0000001173949384_t7b8bf17d355c4e6e83c2ea0bf682d7bd" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Operator parameter description</caption><thead align="left"><tr id="mrs_01_1136__en-us_topic_0000001173949384_ra0b0c9369cb742a5a8ce2981fe23f8ea"><th align="left" class="cellrowborder" valign="top" width="18.37%" id="mcps1.3.3.2.2.6.1.1"><p id="mrs_01_1136__en-us_topic_0000001173949384_a250bb79489624065ac04c790f66c05b6">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_1136__en-us_topic_0000001173949384_aaef487b287994ec5827be1e278176786">Description</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_1136__en-us_topic_0000001173949384_ad250c2ef71d94c9289805035763e6362">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_1136__en-us_topic_0000001173949384_a46d930456d404ce09c216186d77768f1">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_1136__en-us_topic_0000001173949384_ab6953630133f47898a0d42139c8a84d8">Default Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1136__en-us_topic_0000001173949384_rdc7fbf9451074ae5b2b006d93fd51aa2"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1136__en-us_topic_0000001173949384_a5ff5d6f81de345999cc09f0436952b92">Input field name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1136__en-us_topic_0000001173949384_a986c07b1aaa240f9b7a673cd418aa25a">Name of a field to be separated. Set this parameter to the name of a field generated in the previous conversion step.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1136__en-us_topic_0000001173949384_abbd54ad3e11e410eb2633dde79c70c5c">string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1136__en-us_topic_0000001173949384_afe76674e0ae24984aae1e81d789106f0">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1136__en-us_topic_0000001173949384_a126ec69c74c04900b5e11d382186347f">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1136__en-us_topic_0000001173949384_r634b3c20ca194a2e99db152f62e6478e"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1136__en-us_topic_0000001173949384_a3bbd81a247f146069b24d4d11d435176">Delimiter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1136__en-us_topic_0000001173949384_acc30a890fc1745d68636bd55b98ee343">Delimiter.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1136__en-us_topic_0000001173949384_a4d97b933c6f145888795cef3b22263cf">string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1136__en-us_topic_0000001173949384_aaec87a41e822417a9ba2e5f210b9f5f3">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1136__en-us_topic_0000001173949384_a52eba0c681fa4f65a4eac87b5093bc0d">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1136__en-us_topic_0000001173949384_r8d0f3753187d47e29d677004c983426e"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1136__en-us_topic_0000001173949384_af5f42a8dd14944e4a502cdfeb9dc7d6a">Fields extracted</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1136__en-us_topic_0000001173949384_ad4c33d769eb14d578ede82e8f6c929bb">Fields generated after field separation. Multiple fields can be generated after field separation.</p>
|
|
<ul id="mrs_01_1136__en-us_topic_0000001173949384_u7ddd735411c745bfab7165139fe409d6"><li id="mrs_01_1136__en-us_topic_0000001173949384_l267fb6b8814a403c952a66c07e8cecc2"><span class="parmname" id="mrs_01_1136__en-us_topic_0000001173949384_p21cdb257f0914fe68cf420957222e8b0"><b>position</b></span>: Position of fields generated after field separation.</li><li id="mrs_01_1136__en-us_topic_0000001173949384_l77d0d6738ea94cd3b048a9783618fcd3"><span class="parmname" id="mrs_01_1136__en-us_topic_0000001173949384_pd9d257eca799439d9ad93b4fa1f22c6c"><b>output field name</b></span>: Names of output fields.</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1136__en-us_topic_0000001173949384_ab7ae117104d14ec0b56fb56a2e79c6a3">map</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1136__en-us_topic_0000001173949384_ac56bd436a8514591b328b007abf43c84">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1136__en-us_topic_0000001173949384_a40593298aba846629571b276c5f88783">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1136__en-us_topic_0000001173949384_sc5d4bad395ba4fcab1b2eeac12881ca4"><h4 class="sectiontitle">Data Processing Rule</h4><ul id="mrs_01_1136__en-us_topic_0000001173949384_u7803063b439749f9ba0ea311002455d7"><li id="mrs_01_1136__en-us_topic_0000001173949384_lfdf8c021efa04bb5a6dcf9fe83c7b312">The value of the input field is separated by specified delimiters and the segments are assigned to the new fields.</li><li id="mrs_01_1136__en-us_topic_0000001173949384_l0f92132796db4f8a9af0be3e33b9fac4">If the number of field columns after separation is greater than the actual number allowed by the original data, the line will become dirty data.</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1136__en-us_topic_0000001173949384_sbe21d8a34f044c639365abcd5813eb97"><h4 class="sectiontitle">Example</h4><p id="mrs_01_1136__en-us_topic_0000001173949384_acba06d6767e84ffca0d355bf2123dc95">Use the <span class="parmname" id="mrs_01_1136__en-us_topic_0000001173949384_pf73e9cb269de40dcbe271f4593cccd79"><b>CSV File Input</b></span> operator to generate field A.</p>
|
|
<p id="mrs_01_1136__en-us_topic_0000001173949384_a6d54c5060b124ebe9ce32d636bd86525">The following figure shows the source file.</p>
|
|
<p id="mrs_01_1136__en-us_topic_0000001173949384_a9c5b88b530be41219a81a43f8d958e6c"><span><img id="mrs_01_1136__en-us_topic_0000001173949384_i00fdf8b3ec0c42f99385456e7246f44a" src="en-us_image_0000001349139673.jpg"></span></p>
|
|
<p id="mrs_01_1136__en-us_topic_0000001173949384_af5ea07f34fb74300a9e513f79ee452ba">Configure the <span class="parmname" id="mrs_01_1136__en-us_topic_0000001173949384_p204ae23c1d1347a9b9cfc81289e66d6a"><b>Extract Fields</b></span> operator, set <span class="parmname" id="mrs_01_1136__en-us_topic_0000001173949384_p18ec0ae32cde4de8b707711a8d5e3cbd"><b>Delimiter</b></span> to blank space, and generate three fields B, C, and D.</p>
|
|
<p id="mrs_01_1136__en-us_topic_0000001173949384_a818db439b32c4c0da9bd1a156598c036"><span><img id="mrs_01_1136__en-us_topic_0000001173949384_i0fca90f517ad4b32a0b16299ed32c83b" src="en-us_image_0000001349259265.png"></span></p>
|
|
<p id="mrs_01_1136__en-us_topic_0000001173949384_a1b86e2892b4c4e978117e6536c252a52">After conversion, fields A, B, C, and D are generated, as shown in the following figure.</p>
|
|
<p id="mrs_01_1136__en-us_topic_0000001173949384_a0aa00043e2c04f93b35ae9de436564e7"><span><img id="mrs_01_1136__en-us_topic_0000001173949384_i64bafcc86d524af0846ff71284b67278" src="en-us_image_0000001348739989.jpg"></span></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1130.html">Conversion Operators</a></div>
|
|
</div>
|
|
</div>
|
|
|