<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question ReplaceTextWithMapping to replace value with space in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/ReplaceTextWithMapping-to-replace-value-with-space/m-p/278891#M208303</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to replace text with space using &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.5.0/org.apache.nifi.processors.standard.ReplaceTextWithMapping/" target="_self"&gt;ReplaceTextWithMapping processor&lt;/A&gt;. I have file with multiple lines&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;"action":"account sing up"
"action":"account sign in"
"action":"account sign out"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I have a mapping file with \t separating the search value and replace value&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;account sing up    asu
account sign in     asi
account sign out    aso&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regular expressions "action":"(.*)"&lt;/P&gt;
&lt;P&gt;Matching group: 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;"action":"account sing up"
"action":"account sign in"
"action":"account sign out"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;"action":"asu"
"action":"asi"
"action":"aso"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know what I did wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
    <pubDate>Sat, 05 Oct 2019 20:37:48 GMT</pubDate>
    <dc:creator>tsunbonyu</dc:creator>
    <dc:date>2019-10-05T20:37:48Z</dc:date>
    <item>
      <title>ReplaceTextWithMapping to replace value with space</title>
      <link>https://community.cloudera.com/t5/Support-Questions/ReplaceTextWithMapping-to-replace-value-with-space/m-p/278891#M208303</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to replace text with space using &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.5.0/org.apache.nifi.processors.standard.ReplaceTextWithMapping/" target="_self"&gt;ReplaceTextWithMapping processor&lt;/A&gt;. I have file with multiple lines&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;"action":"account sing up"
"action":"account sign in"
"action":"account sign out"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I have a mapping file with \t separating the search value and replace value&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;account sing up    asu
account sign in     asi
account sign out    aso&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regular expressions "action":"(.*)"&lt;/P&gt;
&lt;P&gt;Matching group: 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;"action":"account sing up"
"action":"account sign in"
"action":"account sign out"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;"action":"asu"
"action":"asi"
"action":"aso"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know what I did wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Sat, 05 Oct 2019 20:37:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/ReplaceTextWithMapping-to-replace-value-with-space/m-p/278891#M208303</guid>
      <dc:creator>tsunbonyu</dc:creator>
      <dc:date>2019-10-05T20:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: ReplaceTextWithMapping to replace value with space</title>
      <link>https://community.cloudera.com/t5/Support-Questions/ReplaceTextWithMapping-to-replace-value-with-space/m-p/279812#M208474</link>
      <description>&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ReplaceTextWithMapping processor has been around for some time now and its design is rather simplistic in its current implementation. I&lt;SPAN&gt;t is designed to match a simple regex that will map one group of &lt;STRONG&gt;non-whitespace characters&lt;/STRONG&gt; to another group of characters (can have white space and back references).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;in your example you are matching on a a set of characters that contains whitespaces.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you were to add a replaceText processor to your flow to replace all the whitespace with a non-whitespace character like "-", then it will work. sample ReplaceText processor configuration:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-10-09 at 1.42.06 PM.png" style="width: 487px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/24872i92D7D6005CC7B032/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-10-09 at 1.42.06 PM.png" alt="Screen Shot 2019-10-09 at 1.42.06 PM.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Your mapping file would of course then be based off this change:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;account-sing-up	asu
account-sign-in	asi
account-sign-out	aso&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the resulting mapping would then work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-10-09 at 1.46.24 PM.png" style="width: 328px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/24873iE3CB0543F53AC566/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-10-09 at 1.46.24 PM.png" alt="Screen Shot 2019-10-09 at 1.46.24 PM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 17:47:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/ReplaceTextWithMapping-to-replace-value-with-space/m-p/279812#M208474</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-10-09T17:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: ReplaceTextWithMapping to replace value with space</title>
      <link>https://community.cloudera.com/t5/Support-Questions/ReplaceTextWithMapping-to-replace-value-with-space/m-p/279813#M208475</link>
      <description>&lt;P&gt;Thank you. It really helps &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 18:16:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/ReplaceTextWithMapping-to-replace-value-with-space/m-p/279813#M208475</guid>
      <dc:creator>tsunbonyu</dc:creator>
      <dc:date>2019-10-09T18:16:10Z</dc:date>
    </item>
  </channel>
</rss>

