<?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 Re: How to use processor ReplaceWithMapping in nifi? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113533#M38495</link>
    <description>&lt;P&gt;I not sure ReplaceWithMapping is powerful enough ...&lt;/P&gt;&lt;P&gt;I would anyhow prefer a solution like this (look at the edited answer at the bottom): 
&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/37577453/apache-nifi-executescript-groovy-script-to-replace-json-values-via-a-mapping-fi" target="_blank"&gt;http://stackoverflow.com/questions/37577453/apache-nifi-executescript-groovy-script-to-replace-json-values-via-a-mapping-fi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You have more control which values of which keys you actually replace and you can replace multiple values in one record&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2016 20:03:27 GMT</pubDate>
    <dc:creator>bwalter1</dc:creator>
    <dc:date>2016-08-22T20:03:27Z</dc:date>
    <item>
      <title>How to use processor ReplaceWithMapping in nifi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113532#M38494</link>
      <description>&lt;P&gt;I have splited data json like this:&lt;/P&gt;&lt;P&gt;{"id":"TSO31101","year":"1992","name":"SDN","npsn":"20211628"}&lt;/P&gt;&lt;P&gt;I want to replace "SDN" and "TSO31101" contents using processor ReplaceTextWithMapping&lt;/P&gt;&lt;P&gt;my mapping file content like this:&lt;/P&gt;&lt;P&gt;SDN&amp;lt;tab&amp;gt;SD&lt;/P&gt;&lt;P&gt;TSO31101&amp;lt;tab&amp;gt;AAAA&lt;/P&gt;&lt;P&gt;how it is work?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 17:44:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113532#M38494</guid>
      <dc:creator>rabitbani</dc:creator>
      <dc:date>2016-08-22T17:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use processor ReplaceWithMapping in nifi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113533#M38495</link>
      <description>&lt;P&gt;I not sure ReplaceWithMapping is powerful enough ...&lt;/P&gt;&lt;P&gt;I would anyhow prefer a solution like this (look at the edited answer at the bottom): 
&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/37577453/apache-nifi-executescript-groovy-script-to-replace-json-values-via-a-mapping-fi" target="_blank"&gt;http://stackoverflow.com/questions/37577453/apache-nifi-executescript-groovy-script-to-replace-json-values-via-a-mapping-fi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You have more control which values of which keys you actually replace and you can replace multiple values in one record&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 20:03:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113533#M38495</guid>
      <dc:creator>bwalter1</dc:creator>
      <dc:date>2016-08-22T20:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use processor ReplaceWithMapping in nifi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113534#M38496</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/452/bwalter.html"&gt;Bernhard Walte&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result from ExecuteScript Groovy is:&lt;/P&gt;&lt;P&gt;{bentuk=SD, field2=cd, field3=A2}&lt;/P&gt;&lt;P&gt;Can I get the output with the json format?&lt;/P&gt;&lt;P&gt;thanks for your solutions, im looking forward for your reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 14:06:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113534#M38496</guid>
      <dc:creator>rabitbani</dc:creator>
      <dc:date>2016-08-23T14:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use processor ReplaceWithMapping in nifi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113535#M38497</link>
      <description>&lt;P&gt;Replace&lt;/P&gt;&lt;PRE&gt;outputStream.write(inJson.toString().getBytes(StandardCharsets.UTF_8))&lt;/PRE&gt;&lt;P&gt;by&lt;/P&gt;&lt;PRE&gt;def outJson = new JsonBuilder(inJson)
outputStream.write(outJson.toString().getBytes(StandardCharsets.UTF_8))&lt;/PRE&gt;&lt;P&gt;The referenced sample in StackOverflow already imports jsonBuilder&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 20:45:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-processor-ReplaceWithMapping-in-nifi/m-p/113535#M38497</guid>
      <dc:creator>bwalter1</dc:creator>
      <dc:date>2016-08-24T20:45:46Z</dc:date>
    </item>
  </channel>
</rss>

