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

54 lines
6.9 KiB
HTML

<a name="mrs_01_1137"></a><a name="mrs_01_1137"></a>
<h1 class="topictitle1">Modulo Integer</h1>
<div id="body8662426"><div class="section" id="mrs_01_1137__en-us_topic_0000001173949892_s1c08e10fa67c4b07984bc21c08bf56ad"><h4 class="sectiontitle">Overview</h4><p id="mrs_01_1137__en-us_topic_0000001173949892_a73ff735e64df412b9b018467dc510cf8">The <span class="parmname" id="mrs_01_1137__en-us_topic_0000001173949892_p32269499dfc543b3be764c42d005be75"><b>Modulo Integer</b></span> operator performs modulo operations on integer fields to generate new fields.</p>
</div>
<div class="section" id="mrs_01_1137__en-us_topic_0000001173949892_s608f5dca5cc744f7aab14460f59e5588"><h4 class="sectiontitle">Input and Output</h4><ul id="mrs_01_1137__en-us_topic_0000001173949892_u1477fe2842b04acf90c65f732831b3d5"><li id="mrs_01_1137__en-us_topic_0000001173949892_l9a03f8e6896c4dc5b3a5ca2d55794582">Input: integer fields</li><li id="mrs_01_1137__en-us_topic_0000001173949892_l84cae15de87641808257d282234fcc57">Output: new fields</li></ul>
</div>
<div class="section" id="mrs_01_1137__en-us_topic_0000001173949892_s989ddafebbf14e0c852cadf97eb8fe9e"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1137__en-us_topic_0000001173949892_te01de55fd3d24f0a9d220555f8d35e48" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Operator parameter description</caption><thead align="left"><tr id="mrs_01_1137__en-us_topic_0000001173949892_r57615b5d8ba34d56bdf27363366fcf17"><th align="left" class="cellrowborder" valign="top" width="18.37%" id="mcps1.3.3.2.2.6.1.1"><p id="mrs_01_1137__en-us_topic_0000001173949892_a607432ec8c374504a55e72f219fe5950">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_1137__en-us_topic_0000001173949892_a123de5051d30454b9bc8c6446e8526a6">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_1137__en-us_topic_0000001173949892_a504608f2b6f349d9b2a4f6767c7d3426">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_1137__en-us_topic_0000001173949892_a84ffa2b1fb694870a81df1ccda3188e6">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_1137__en-us_topic_0000001173949892_ae6ec670fabd84c9991ec56ad17b9b998">Default Value</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_1137__en-us_topic_0000001173949892_r942f6455b2194a589f0d2b4cab91b9eb"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1137__en-us_topic_0000001173949892_a41957d9219de43a3ad5ecbca368447c8">Modulo fields</p>
</td>
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1137__en-us_topic_0000001173949892_a4a8f87433dd4454d85e05a979e24ade1">Modulo operation information:</p>
<ul id="mrs_01_1137__en-us_topic_0000001173949892_u01f28916b9be4a7dbef67c87b6e1407a"><li id="mrs_01_1137__en-us_topic_0000001173949892_l4c2aedcf0859434ea5c09e426d427287"><span class="parmname" id="mrs_01_1137__en-us_topic_0000001173949892_p5f59e1e95f8644489f7a809737950f6f"><b>input field name</b></span>: Names of input fields. Set this parameter to the names of fields generated in the previous conversion step.</li><li id="mrs_01_1137__en-us_topic_0000001173949892_lc5474f0e9f9f47d1a4fd42ab4f1e5908"><span class="parmname" id="mrs_01_1137__en-us_topic_0000001173949892_p114de0f7b2924f9f9eb2e66d87116ca0"><b>output field name</b></span>: Names of output fields.</li><li id="mrs_01_1137__en-us_topic_0000001173949892_ld3cf62082cb447a9ad9a64d4aeb73b4d"><span class="parmname" id="mrs_01_1137__en-us_topic_0000001173949892_pd50be5e91ec74db4a1772449c4180da2"><b>modulus</b></span>: Values used for a modulo operation.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1137__en-us_topic_0000001173949892_a75c669b274ca4de7af8b2999c9d1d84b">map</p>
</td>
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1137__en-us_topic_0000001173949892_a08c66b8901e241bcbef9569557fe8de8">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1137__en-us_topic_0000001173949892_a240e5aaa6a7c43419dac80fc37f201f3">None</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_01_1137__en-us_topic_0000001173949892_s0b9949960c2d4e099a137f1f4918b738"><h4 class="sectiontitle">Data Processing Rule</h4><ul id="mrs_01_1137__en-us_topic_0000001173949892_u8a14cf84801b43cf9c7213850b6a7668"><li id="mrs_01_1137__en-us_topic_0000001173949892_l2e9d7ceae7e746999c8c524d75529e30">The operator generates new fields and the values are those after the modulo operation.</li><li id="mrs_01_1137__en-us_topic_0000001173949892_lbacdcbcfc15e4989b75c9c0f0b8c3246">The field values must be integers; otherwise, the current line becomes dirty data.</li></ul>
</div>
<div class="section" id="mrs_01_1137__en-us_topic_0000001173949892_s207e55cade8b4a1cbd99015d5532eb6c"><h4 class="sectiontitle">Example</h4><p id="mrs_01_1137__en-us_topic_0000001173949892_a1209c8402e024b6dbcd3c2238359eb46">Use the <span class="parmname" id="mrs_01_1137__en-us_topic_0000001173949892_pf26414ac07964a02a84c64bf48507ba8"><b>CSV File Input</b></span> operator to generate fields A and B.</p>
<p id="mrs_01_1137__en-us_topic_0000001173949892_adf6e6b098a784a879667f0871f606049">The following figure shows the source file.</p>
<p id="mrs_01_1137__en-us_topic_0000001173949892_a1fa0e8b4880540568cb6d9e6acb7073b"><span><img id="mrs_01_1137__en-us_topic_0000001173949892_ic4ebf7a81d10411aa98ace36ea6a52e3" src="en-us_image_0000001349259209.jpg"></span></p>
<p id="mrs_01_1137__en-us_topic_0000001173949892_ae7a0d30e023d4072951b4e7e70d1250a">Configure the <span class="parmname" id="mrs_01_1137__en-us_topic_0000001173949892_p84fe98a30c034f499061adb3ef4f4046"><b>Modulo Integer</b></span> operator to generate two new fields C and D.</p>
<p id="mrs_01_1137__en-us_topic_0000001173949892_a36817de42df34903a4be832a187a89ac"><span><img id="mrs_01_1137__en-us_topic_0000001173949892_iafa2a2871aa447b48bc4323058105767" src="en-us_image_0000001295900068.png"></span></p>
<p id="mrs_01_1137__en-us_topic_0000001173949892_a8fc4af43ceae41998adab3bb6a17b54e">After the modulo operation, fields A, B, C, and D are generated, as shown in the following figure.</p>
<p id="mrs_01_1137__en-us_topic_0000001173949892_a10c96498f3ba42dcbb35cc2589461abf"><span><img id="mrs_01_1137__en-us_topic_0000001173949892_i8d6613fc55224785841966b503049850" src="en-us_image_0000001349059753.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>