<?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 the text file which has key and value. How to convert the that to the JSON object in NIFI in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/I-have-the-text-file-which-has-key-and-value-How-to-convert/m-p/358222#M237777</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/68571"&gt;@Faerballert&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's working fine as expected. Thank you so much for the quick response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 10:51:37 GMT</pubDate>
    <dc:creator>Techie123</dc:creator>
    <dc:date>2022-11-23T10:51:37Z</dc:date>
    <item>
      <title>I have the text file which has key and value. How to convert the that to the JSON object in NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-the-text-file-which-has-key-and-value-How-to-convert/m-p/358144#M237759</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Record 6|Invalid values for Entry Date.&lt;BR /&gt;Record 7|Processing failed due to error in record: 6&lt;BR /&gt;Record 8|Processing failed due to error in record: 6&lt;BR /&gt;Record 9|Processing failed due to error in record: 6&lt;BR /&gt;Record 10|Processing failed due to error in record: 6&lt;BR /&gt;Record 11|Duplicate of record Job id&amp;nbsp; : , data id : , first_name: , last_name: , Date: 2021, Entry Date: 2021.&lt;BR /&gt;Record 12|Processing failed due to error in record: 11&lt;BR /&gt;Record 13|Processing failed due to error in record: 11&lt;BR /&gt;Record 14|Processing failed due to error in record: 11&lt;BR /&gt;Record 15|Processing failed due to error in record: 11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert it like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[&lt;BR /&gt;{&lt;BR /&gt;"Record 6":"Invalid values for Entry Date."&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Record 7":"Processing failed due to error in record: 6"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Record 8":"Processing failed due to error in record: 6"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Record 9":"Processing failed due to error in record: 6"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Record 10":"Processing failed due to error in record: 6"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Record 11":"Duplicate of record Job id&amp;nbsp; : , data id : , first_name: , last_name: , Date: 2021, Entry Date: 2021."&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Record 12":"Processing failed due to error in record: 11"},&lt;BR /&gt;{&lt;BR /&gt;"Record 13":"Processing failed due to error in record: 11"},&lt;BR /&gt;{&lt;BR /&gt;"Record 14":"Processing failed due to error in record: 11"},&lt;BR /&gt;{&lt;BR /&gt;"Record 15":"Processing failed due to error in record: 11"}]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do that. Please help&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 12:17:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-the-text-file-which-has-key-and-value-How-to-convert/m-p/358144#M237759</guid>
      <dc:creator>Techie123</dc:creator>
      <dc:date>2022-11-22T12:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: I have the text file which has key and value. How to convert the that to the JSON object in NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-the-text-file-which-has-key-and-value-How-to-convert/m-p/358221#M237776</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;quick and dirty solution:&lt;/P&gt;&lt;P&gt;In Apache Nifi there you can find the&amp;nbsp;&lt;SPAN&gt;SplitText Processor, there you can set the&amp;nbsp;&lt;SPAN class="table-cell required"&gt;Line Split Count to 1. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;Those splitted Flowfiles get some fragment attributes to merge them together again. So after splitting you can merge directly again with&amp;nbsp;MergeContent Processor.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;For this processor you set properties like:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;- Merge Strategy: Defragment&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;- Delimiter Strategy: Text&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;- Header:&amp;nbsp;[{"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;- Footer:&amp;nbsp;"}]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;- Demarcator:&amp;nbsp;"},{"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;After that we can split key values with ReplaceText Processor with following properties what needs to be changed from default:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;-&amp;nbsp;Search Value:&amp;nbsp;\|&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;-&amp;nbsp;&lt;SPAN class="table-cell required"&gt;Replacement Value:&amp;nbsp;":"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="table-cell required"&gt;&lt;SPAN class="table-cell required"&gt;Greetings&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 10:57:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-the-text-file-which-has-key-and-value-How-to-convert/m-p/358221#M237776</guid>
      <dc:creator>Faerballert</dc:creator>
      <dc:date>2022-11-23T10:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: I have the text file which has key and value. How to convert the that to the JSON object in NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-the-text-file-which-has-key-and-value-How-to-convert/m-p/358222#M237777</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/68571"&gt;@Faerballert&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's working fine as expected. Thank you so much for the quick response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 10:51:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-the-text-file-which-has-key-and-value-How-to-convert/m-p/358222#M237777</guid>
      <dc:creator>Techie123</dc:creator>
      <dc:date>2022-11-23T10:51:37Z</dc:date>
    </item>
  </channel>
</rss>

