<?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 transform a json array into a string list in NIFI in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-transform-a-json-array-into-a-string-list-in-NIFI/m-p/182346#M61600</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/18500/adibaminemdr.html" nodeid="18500"&gt;@brian adi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use the SplitJson processor to get the array into individual flowfile records, then use EvaluateJsonPath to pull out the values of interest, and ReplaceText to get the content back into a CSV format.  Here is a good example with screenshots showing how to do this using NiFi&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/64069/converting-a-large-json-file-into-csv.html" target="_blank"&gt;https://community.hortonworks.com/articles/64069/converting-a-large-json-file-into-csv.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As always, if you find this post useful, don't forget to accept the answer.&lt;/P&gt;</description>
    <pubDate>Tue, 23 May 2017 23:06:27 GMT</pubDate>
    <dc:creator>ssahi</dc:creator>
    <dc:date>2017-05-23T23:06:27Z</dc:date>
    <item>
      <title>How to transform a json array into a string list in NIFI</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-transform-a-json-array-into-a-string-list-in-NIFI/m-p/182345#M61599</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i have a queryCassandra which generate a json like this one:&lt;/P&gt;&lt;PRE&gt;{"results":[{"term":"term1"},{"term":"term2"}..]} &lt;/PRE&gt;&lt;P&gt;Now, i want to get from this all the terms values separated by some separator in string format; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ex : term1,term2,term3 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So i can pass this list as a string parameter for a java main program which i've alreat set. &lt;/P&gt;&lt;P&gt;(i only need the transofrmation, not the java program execution) Thank you !&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 22:44:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-transform-a-json-array-into-a-string-list-in-NIFI/m-p/182345#M61599</guid>
      <dc:creator>adib_amine_mdr</dc:creator>
      <dc:date>2017-05-22T22:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform a json array into a string list in NIFI</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-transform-a-json-array-into-a-string-list-in-NIFI/m-p/182346#M61600</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/18500/adibaminemdr.html" nodeid="18500"&gt;@brian adi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use the SplitJson processor to get the array into individual flowfile records, then use EvaluateJsonPath to pull out the values of interest, and ReplaceText to get the content back into a CSV format.  Here is a good example with screenshots showing how to do this using NiFi&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/64069/converting-a-large-json-file-into-csv.html" target="_blank"&gt;https://community.hortonworks.com/articles/64069/converting-a-large-json-file-into-csv.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As always, if you find this post useful, don't forget to accept the answer.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 23:06:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-transform-a-json-array-into-a-string-list-in-NIFI/m-p/182346#M61600</guid>
      <dc:creator>ssahi</dc:creator>
      <dc:date>2017-05-23T23:06:27Z</dc:date>
    </item>
  </channel>
</rss>

