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>
56 lines
6.7 KiB
HTML
56 lines
6.7 KiB
HTML
<a name="mrs_01_1140"></a><a name="mrs_01_1140"></a>
|
|
|
|
<h1 class="topictitle1">String Operations</h1>
|
|
<div id="body8662426"><div class="section" id="mrs_01_1140__en-us_topic_0000001219029747_s75794236af5341e6a4b7f4c16f318a82"><h4 class="sectiontitle">Overview</h4><p id="mrs_01_1140__en-us_topic_0000001219029747_aac8ac5f5e3204bb593497a35e5cde078">The <span class="parmname" id="mrs_01_1140__en-us_topic_0000001219029747_pf7e03699d8874f999a94b862b201f540"><b>String Operations</b></span> operator converts the upper and lower cases of existing fields to generate new fields.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1140__en-us_topic_0000001219029747_s340e2b6c7e954e47a738b573994e8b1a"><h4 class="sectiontitle">Input and Output</h4><ul id="mrs_01_1140__en-us_topic_0000001219029747_u4294f93c840b42bd9a62c9593a4f4988"><li id="mrs_01_1140__en-us_topic_0000001219029747_lc33864b2d95240108c8e32f6bf083836">Input: fields whose case is to be converted</li><li id="mrs_01_1140__en-us_topic_0000001219029747_l886483052b994df4a772e338aa75e553">Output: new fields after conversion</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1140__en-us_topic_0000001219029747_s08b5e126f9864e6384038b299e27ec27"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1140__en-us_topic_0000001219029747_tbbfd69c0e73148359daae124a91b388f" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Operator parameter description</caption><thead align="left"><tr id="mrs_01_1140__en-us_topic_0000001219029747_rdd3f0fe2749d4395af3f43b795b25e09"><th align="left" class="cellrowborder" valign="top" width="18.37%" id="mcps1.3.3.2.2.6.1.1"><p id="mrs_01_1140__en-us_topic_0000001219029747_ae38a761a03274d4dbd5ed378f98ba524">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_1140__en-us_topic_0000001219029747_a15f9afdb50a34317be2ecfb204b3f965">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_1140__en-us_topic_0000001219029747_a725a73ad4dd44d40a28a7fc86347c580">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_1140__en-us_topic_0000001219029747_a8c5bf9c4fa6c4291aa466b7e5a57d25d">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_1140__en-us_topic_0000001219029747_a22e66a69bad34f7e8697cccf8d5911fa">Default Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1140__en-us_topic_0000001219029747_r0291880bff6041d7b5967d20783307a4"><td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_1140__en-us_topic_0000001219029747_aabe8c0a19c254750b22080484c3de862">Fields to be processed</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.730000000000004%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_1140__en-us_topic_0000001219029747_ac76dfed98b704d6297147ad4b0c4c7a8">Information about fields for string case conversion:</p>
|
|
<ul id="mrs_01_1140__en-us_topic_0000001219029747_u183009637fc94cdabe5493e6d4891080"><li id="mrs_01_1140__en-us_topic_0000001219029747_l5c453aa3a8b44d5a85dad778c1d1766f"><span class="parmname" id="mrs_01_1140__en-us_topic_0000001219029747_p3ac644f9da764769806e608b29624f9b"><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_1140__en-us_topic_0000001219029747_l35d5a42153b24071a954b68d66250c10"><span class="parmname" id="mrs_01_1140__en-us_topic_0000001219029747_pf8c31bbb472b4304a06162338aec1e78"><b>output field name</b></span>: Names of output fields.</li><li id="mrs_01_1140__en-us_topic_0000001219029747_l6366adffcf5b4e94ac703f28bb5ea0e7"><span class="parmname" id="mrs_01_1140__en-us_topic_0000001219029747_p9038e878114f42de9c7016bb3369dc73"><b>lower/upper</b></span>: Indicates whether data is to be converted into uppercase letters or lowercase letters.</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_1140__en-us_topic_0000001219029747_a08007722d8b6428e8a82240b2b4ba629">map</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_1140__en-us_topic_0000001219029747_adaf990af76a74ee8a65c3abdf5aec7b9">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.69%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_1140__en-us_topic_0000001219029747_a9b0837e3e08a4f838f2efbb7a2acca8d">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1140__en-us_topic_0000001219029747_s2c63f727537b45a693c290424ecaa618"><h4 class="sectiontitle">Data Processing Rule</h4><ul id="mrs_01_1140__en-us_topic_0000001219029747_ubd4a75aff8ee4b1fbec4f205302e8e6f"><li id="mrs_01_1140__en-us_topic_0000001219029747_l87f4ce059ea64eb8b45ae39f7c847440">Case conversion is performed for strings.</li><li id="mrs_01_1140__en-us_topic_0000001219029747_lf0548df78204465499862bdfe131c728">If the input data is null, no case conversion is performed.</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1140__en-us_topic_0000001219029747_s9c730f83d4e849b3a814340dbc2d261e"><h4 class="sectiontitle">Example</h4><p id="mrs_01_1140__en-us_topic_0000001219029747_a8eaaba0e59564e699c0a569068119b24">Use the <span class="parmname" id="mrs_01_1140__en-us_topic_0000001219029747_p1168377d3ff34add9e5a41a53428d239"><b>CSV File Input</b></span> operator to generate fields A and B.</p>
|
|
<p id="mrs_01_1140__en-us_topic_0000001219029747_a3e0313c8b3684d03884b2a23d1531c85">The following figure shows the source file.</p>
|
|
<pre class="screen" id="mrs_01_1140__screen1483997204312">abcd,product
|
|
FusionInsight,Bigdata</pre>
|
|
<p id="mrs_01_1140__en-us_topic_0000001219029747_a2314ef3aeb1f4306856ecc12b6d5cbe4">After configuring the <span class="parmname" id="mrs_01_1140__en-us_topic_0000001219029747_pc1df9d1c79844ec2b3c8e3479edacc86"><b>String Operations</b></span> operator, fields C and D are generated.</p>
|
|
<p id="mrs_01_1140__en-us_topic_0000001219029747_ae1b8e4609e114a22881433bb60e8d994"><span><img id="mrs_01_1140__en-us_topic_0000001219029747_id2b047dd875247f29e8e91d44761e37a" src="en-us_image_0000001348739897.png"></span></p>
|
|
<p id="mrs_01_1140__en-us_topic_0000001219029747_a813ac55b9f964b75b51988f911aa948c">After conversion, four fields are generated, as shown in the following figure.</p>
|
|
<pre class="screen" id="mrs_01_1140__screen16668110124515">abcd,product,ABCD,product
|
|
FusionInsight,Bigdata,FUSIONINSIGHT,bigdata</pre>
|
|
</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>
|
|
|