<?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: I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376904#M243054</link>
    <description>&lt;P&gt;Name, class, grade, address, first_url, second_url&lt;/P&gt;&lt;P&gt;John, 10th,A,New York,uhttps://&lt;A href="http://www.facebook.com,/brnds-coupons/offers" target="_blank"&gt;www.facebook.com,/brnds-coupons/offers&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Sep 2023 05:48:20 GMT</pubDate>
    <dc:creator>Abhiram-4455</dc:creator>
    <dc:date>2023-09-27T05:48:20Z</dc:date>
    <item>
      <title>I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376843#M243030</link>
      <description>&lt;P&gt;output file:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"name" : "name",&lt;BR /&gt;"class" : "a",&lt;BR /&gt;"grade" : "A",&lt;BR /&gt;"address" : "state"&lt;BR /&gt;"url" :{&lt;/P&gt;&lt;P&gt;"first url":"url",&lt;/P&gt;&lt;P&gt;"second url":"url"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 12:42:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376843#M243030</guid>
      <dc:creator>Abhiram-4455</dc:creator>
      <dc:date>2023-09-26T12:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376874#M243043</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107095"&gt;@Abhiram-4455&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/103151"&gt;@cotopaul&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 15:39:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376874#M243043</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2023-09-26T15:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376890#M243048</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107095"&gt;@Abhiram-4455&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the input look like?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 18:24:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376890#M243048</guid>
      <dc:creator>drewski7</dc:creator>
      <dc:date>2023-09-26T18:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376891#M243049</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107095"&gt;@Abhiram-4455&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;The easiest way to do such transformation is to use ConvertRecord to convert the format from CSV format to JSON&amp;nbsp; format, then you can use JoltTransformation processor to do the proper transformation to the final format that you need. To see an example of this please refer to the following post: &lt;A href="https://community.cloudera.com/t5/Support-Questions/want-to-convert-csv-to-nested-json-using-nifi/td-p/224954" target="_blank"&gt;https://community.cloudera.com/t5/Support-Questions/want-to-convert-csv-to-nested-json-using-nifi/td-p/224954&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If that helps please accept solution.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 18:44:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376891#M243049</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-09-26T18:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376904#M243054</link>
      <description>&lt;P&gt;Name, class, grade, address, first_url, second_url&lt;/P&gt;&lt;P&gt;John, 10th,A,New York,uhttps://&lt;A href="http://www.facebook.com,/brnds-coupons/offers" target="_blank"&gt;www.facebook.com,/brnds-coupons/offers&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 05:48:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376904#M243054</guid>
      <dc:creator>Abhiram-4455</dc:creator>
      <dc:date>2023-09-27T05:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376905#M243055</link>
      <description>&lt;P&gt;I have tried this example but getting errors like: unable to pares incoming data. Lot of errors... So can you help to get step by step process for which processor need to use and and configuration&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 05:50:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376905#M243055</guid>
      <dc:creator>Abhiram-4455</dc:creator>
      <dc:date>2023-09-27T05:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376950#M243077</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107095"&gt;@Abhiram-4455&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Assuming you have the following input where you can have multiple records per CSV input:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Name,class,grade,address,first_url,second_url
John,10th,A,New York,https://www.facebook.com,/brnds-coupons/offers
sam,9th,A,Dallas,www.google.com,www.amazon.com&lt;/LI-CODE&gt;&lt;P&gt;You can use the following processors to do your transformation:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_0-1695823148778.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38528iA5A397839C2639C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_0-1695823148778.png" alt="SAMSAL_0-1695823148778.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Where each processor is configured as the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- ConvertRecord:&lt;/STRONG&gt; is to convert from CSV format to JSON&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_1-1695823271838.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38529i226E6F1D91CA04BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_1-1695823271838.png" alt="SAMSAL_1-1695823271838.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CSVReader: &lt;/STRONG&gt;(use default settings)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_2-1695823395667.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38530i2211580F1FDAF031/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_2-1695823395667.png" alt="SAMSAL_2-1695823395667.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note: you can adjust the "&lt;STRONG&gt;Value Separator&lt;/STRONG&gt;" in case the CSV delimiter is different from ",".&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JSONRecorSertWriter:&lt;/STRONG&gt; (use default settings)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_3-1695823517965.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38531i0651582BDD85CCC2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_3-1695823517965.png" alt="SAMSAL_3-1695823517965.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- JoltTransformationJSON:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_4-1695823609582.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38532i0076141AF700D01D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_4-1695823609582.png" alt="SAMSAL_4-1695823609582.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;where "&lt;STRONG&gt;Jolt Specification&lt;/STRONG&gt;" is set to the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "operation": "shift",
    "spec": {
      "*": {
        "*": "[&amp;amp;1].&amp;amp;",
        "first_url": "[&amp;amp;1].url.&amp;amp;",
        "second_url": "[&amp;amp;1].url.&amp;amp;"
      }
    }
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output shouldlook like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
	{
		"Name": "John",
		"class": "10th",
		"grade": "A",
		"address": "New York",
		"url": {
			"first_url": "https://www.facebook.com",
			"second_url": "/brnds-coupons/offers"
		}
	},
	{
		"Name": "sam",
		"class": "9th",
		"grade": "A",
		"address": "Dallas",
		"url": {
			"first_url": "www.google.com",
			"second_url": "www.amazon.com"
		}
	}
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you need to process each record separately you can use &lt;STRONG&gt;SplitJson&lt;/STRONG&gt; processor:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_5-1695824348064.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38533i33B8BD39A9F67E14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_5-1695824348064.png" alt="SAMSAL_5-1695824348064.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use the "split" relationship to get the split records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 14:20:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376950#M243077</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-09-27T14:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: I have to convert csv file to nested json can you help me out with flow file configuration .I am new to NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376975#M243087</link>
      <description>&lt;P&gt;Thank you so much SAMSAL it's working&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 07:55:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-to-convert-csv-file-to-nested-json-can-you-help-me/m-p/376975#M243087</guid>
      <dc:creator>Abhiram-4455</dc:creator>
      <dc:date>2023-09-28T07:55:03Z</dc:date>
    </item>
  </channel>
</rss>

