Yang, Tong 3f5759eed2 MRS comp-lts 2.0.38.SP20 version
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>
2023-01-19 17:08:45 +00:00

76 lines
8.9 KiB
HTML

<a name="mrs_01_1135"></a><a name="mrs_01_1135"></a>
<h1 class="topictitle1">Concat Fields</h1>
<div id="body8662426"><div class="section" id="mrs_01_1135__en-us_topic_0000001219149325_s0c7176971fa64558bb1db914f2bd36c2"><h4 class="sectiontitle">Overview</h4><p id="mrs_01_1135__en-us_topic_0000001219149325_a33ae7087f2c140929e1910c573950901">The <span class="parmname" id="mrs_01_1135__en-us_topic_0000001219149325_p4060ef1f9ab6471889644cd3c610e4be"><b>Concat Fields</b></span> operator concatenates existing fields by using delimiters to generate new fields.</p>
</div>
<div class="section" id="mrs_01_1135__en-us_topic_0000001219149325_se821f7f643b84ac694ec4d1ce2fa9c93"><h4 class="sectiontitle">Input and Output</h4><ul id="mrs_01_1135__en-us_topic_0000001219149325_u371cd098b4774d6e80e5200cfb2ad549"><li id="mrs_01_1135__en-us_topic_0000001219149325_lb59ec92ed90d48e29e6ff8398fdbef4e">Input: fields to be concatenated</li><li id="mrs_01_1135__en-us_topic_0000001219149325_l79deee7e360243ed9cec923be0c917e8">Output: new fields</li></ul>
</div>
<div class="section" id="mrs_01_1135__en-us_topic_0000001219149325_s4df2db8081e741fa9df79e6943d5bc83"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1135__en-us_topic_0000001219149325_tdd35e674a72e4ec0947177d9c1ee70c2" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Operator parameter description</caption><thead align="left"><tr id="mrs_01_1135__en-us_topic_0000001219149325_r1375c784b3cb473da0ceb0a886a3cf29"><th align="left" class="cellrowborder" valign="top" width="18.37%" id="mcps1.3.3.2.2.6.1.1"><p id="mrs_01_1135__en-us_topic_0000001219149325_ac8875881425f4f4a81693454144d6348">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_1135__en-us_topic_0000001219149325_a2457932a914c4744a84c10b8b8c52897">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_1135__en-us_topic_0000001219149325_a3af4c3e838c9433481234ce1bafdd128">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_1135__en-us_topic_0000001219149325_ae2cee2908d80477b910c876c43810d4d">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_1135__en-us_topic_0000001219149325_a778d494e215f4179a90f19a580bd6e41">Default Value</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_1135__en-us_topic_0000001219149325_r818f07ccaf1b4608a951471e9ff4a0e8"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1135__en-us_topic_0000001219149325_a440b18890a454426a5dedec5d4325cbf">Output 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_1135__en-us_topic_0000001219149325_ada03e03dede147aba764032b21c46684">Name of a field generated after concatenation.</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1135__en-us_topic_0000001219149325_a8402de78e4314b4ebdc8209df610c953">string</p>
</td>
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1135__en-us_topic_0000001219149325_a91a584bb47334f278cac1629cc644acf">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1135__en-us_topic_0000001219149325_ad9285e5146c044c5b0695bf34309120d">None</p>
</td>
</tr>
<tr id="mrs_01_1135__en-us_topic_0000001219149325_r04d2952a28b44c68be364564ede09d44"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1135__en-us_topic_0000001219149325_ab57aff04013a4dc2b10fca08c5b35093">Delimiter</p>
</td>
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1135__en-us_topic_0000001219149325_abd7a7cc206bb427f8c112a554abfff34">Concatenation character. The value can be blank.</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1135__en-us_topic_0000001219149325_ada790ac950df47ccbbe44a5e71db038d">string</p>
</td>
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1135__en-us_topic_0000001219149325_ac992e112ffe54d49a8a610507617fd7f">No</p>
</td>
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1135__en-us_topic_0000001219149325_a1a835de582c944ccbb0020b51949ecb1">Empty string</p>
</td>
</tr>
<tr id="mrs_01_1135__en-us_topic_0000001219149325_rc41e9eae564c43f08322057514c03ca8"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1135__en-us_topic_0000001219149325_a5a205ec6a62c4ea6a72cafff70912923">Fields to be merged</p>
</td>
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1135__en-us_topic_0000001219149325_af29d4ef0c3964ed189f749f722f1f4d2">Names of fields to be concatenated.</p>
<p id="mrs_01_1135__en-us_topic_0000001219149325_a3d30b10673cb4baaba6c90cfe6e7450f"><span class="parmname" id="mrs_01_1135__en-us_topic_0000001219149325_p230a3847290a45fcbf241d455bd4a8d6"><b>field name</b></span> must be set to the names of fields generated in the previous conversion step. Multiple field names can be added.</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1135__en-us_topic_0000001219149325_ad38ba9ec33dd4d60a5ac477c035a1982">map</p>
</td>
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1135__en-us_topic_0000001219149325_abb98e5318aa64ac5bcfd1d9e71bb4e20">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1135__en-us_topic_0000001219149325_a91086eeb7a1840199f1ed198df7b867e">None</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_01_1135__en-us_topic_0000001219149325_s921413d427994364af7bd8b9bf1c4ade"><h4 class="sectiontitle">Data Processing Rule</h4><ul id="mrs_01_1135__en-us_topic_0000001219149325_ucacad30a358d418abc1eee390abc0f80"><li id="mrs_01_1135__en-us_topic_0000001219149325_lc6f12d751a17423fbec5aa14ff073603">Use delimiters to concatenate the fields specified by <span class="parmname" id="mrs_01_1135__en-us_topic_0000001219149325_pba36bb233f89443b87bd4d44569d1de2"><b>Fields to be merged</b></span> in order and assign the output to <span class="parmname" id="mrs_01_1135__en-us_topic_0000001219149325_pfaec58eb5b6f45188383effb6b3e8e4e"><b>Output field name</b></span>.</li><li id="mrs_01_1135__en-us_topic_0000001219149325_lfa23eb7982d9441ebcbdec13c5ace00f">If the value of a field is null, the value is changed to an empty string and then concatenated with other field values.</li></ul>
</div>
<div class="section" id="mrs_01_1135__en-us_topic_0000001219149325_sf634f21bc0af4c72a15291f1af88ad31"><h4 class="sectiontitle">Example</h4><p id="mrs_01_1135__en-us_topic_0000001219149325_a1ebab431a6864bfabd54608e5896b8de">Use the <span class="parmname" id="mrs_01_1135__en-us_topic_0000001219149325_p5bd910258e7f4c3c8371da88d5554d38"><b>CSV File Input</b></span> operator to generate fields A, B, and C.</p>
<p id="mrs_01_1135__en-us_topic_0000001219149325_a75e8ee0803714ba882b56e31ba2f194e">The following figure shows the source file.</p>
<p id="mrs_01_1135__en-us_topic_0000001219149325_a0ef1e4d35ade4347a82b81d21d80876a"><span><img id="mrs_01_1135__en-us_topic_0000001219149325_i8ed273fca75742f3911d633ef695e5f9" src="en-us_image_0000001348740001.jpg"></span></p>
<p id="mrs_01_1135__en-us_topic_0000001219149325_a879bc305e1e04d35ad9e4b00e6af2b7b">Configure the <span class="parmname" id="mrs_01_1135__en-us_topic_0000001219149325_pdb1f6e22a3eb44c49041267fb6478d67"><b>Concat Fields</b></span> operator, set <span class="parmname" id="mrs_01_1135__en-us_topic_0000001219149325_pdc9e3d0d835b439ab81c715876328e3e"><b>Delimiter</b></span> to blank space, and generate field D.</p>
<p id="mrs_01_1135__en-us_topic_0000001219149325_a9d9794677bbe401caad63b329941bdc0"><span><img id="mrs_01_1135__en-us_topic_0000001219149325_ic32ab125d481497597e1bb6911442903" src="en-us_image_0000001349139689.png"></span></p>
<p id="mrs_01_1135__en-us_topic_0000001219149325_adeb4ac261a834ac5b0cc58822e7b6edb">After concatenation, fields A, B, C, and D are generated, as shown in the following figure.</p>
<p id="mrs_01_1135__en-us_topic_0000001219149325_a0650dc259ecd4de1ae0e5ab2fc7ce522"><span><img id="mrs_01_1135__en-us_topic_0000001219149325_i9ab94ae1ed21420d9a3c6bf19cc3b991" src="en-us_image_0000001349259277.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>