<?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: Extract whole json flowfilecontent(small) to single attribute in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Extract-whole-json-flowfilecontent-small-to-single-attribute/m-p/309055#M223749</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;DIV class="dcxa-lithium-author-name"&gt;&lt;A href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/68571" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Faerballert&lt;/SPAN&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Thanks for helping . I am able to get entire content into attribute .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have one doubt that i have attribute name called "JSONValue" so that extracted value should be in this name but the flowfile content saves into the attribute&amp;nbsp; "JSONValue.&lt;STRONG&gt;0&lt;/STRONG&gt; "&amp;nbsp; as supposed to create value in JSONValue attribute . Please see screen-print for the same . I had to enable "&lt;SPAN&gt;Include Capture Group 0" as True otherwise the Regex not accepting and expecting value 0 to40 other than false.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JSONAttribute.PNG" style="width: 298px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/30053iCEC055C587DEAEF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="JSONAttribute.PNG" alt="JSONAttribute.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jan 2021 12:23:53 GMT</pubDate>
    <dc:creator>adhishankarit</dc:creator>
    <dc:date>2021-01-07T12:23:53Z</dc:date>
    <item>
      <title>Extract whole json flowfilecontent(small) to single attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Extract-whole-json-flowfilecontent-small-to-single-attribute/m-p/308960#M223736</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have nifi flow fthat fetches one json file and using the extractText processor, i want to store entire flowfile content(assume small json file) into one flowfile attribute. But (.*) is not extracting whole json and instead extracting only { . Please help with Java regular expression to extract full json afnd also share if any Java regular expression documentation which i can refer for Nifi extracttext processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nififlows.PNG" style="width: 617px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/30045i5540B1B14800C468/image-size/large?v=v2&amp;amp;px=999" role="button" title="Nififlows.PNG" alt="Nififlows.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ExtractText.PNG" style="width: 755px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/30046i3B101B50429F4CDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="ExtractText.PNG" alt="ExtractText.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="updateattribute.PNG" style="width: 759px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/30047i3D62252024DCCE2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="updateattribute.PNG" alt="updateattribute.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I having json file which contains format like&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;"filename1":"insert into filename1",&lt;/P&gt;&lt;P&gt;"filename2":"insert into filename2",&lt;/P&gt;&lt;P&gt;"filename3":"insert into filename3"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will retrieve the filenames in generic way/dynamic using JsonPath(${filename})&amp;nbsp; in updateattribute .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please assist to extract whole json content into one flow file attribute .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/69083"&gt;@Nifi&lt;/a&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/81898"&gt;@NifiDev&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 16:56:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Extract-whole-json-flowfilecontent-small-to-single-attribute/m-p/308960#M223736</guid>
      <dc:creator>adhishankarit</dc:creator>
      <dc:date>2021-01-06T16:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extract whole json flowfilecontent(small) to single attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Extract-whole-json-flowfilecontent-small-to-single-attribute/m-p/308964#M223739</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you could use following regex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[^^]+&lt;/LI-CODE&gt;&lt;P&gt;with that you should get the whole content.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please take a look at the property "&lt;SPAN&gt;Maximum Capture Group Length" at the ExtractText Processor, that its not too short.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 20:47:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Extract-whole-json-flowfilecontent-small-to-single-attribute/m-p/308964#M223739</guid>
      <dc:creator>Faerballert</dc:creator>
      <dc:date>2021-01-06T20:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extract whole json flowfilecontent(small) to single attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Extract-whole-json-flowfilecontent-small-to-single-attribute/m-p/309055#M223749</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;DIV class="dcxa-lithium-author-name"&gt;&lt;A href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/68571" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Faerballert&lt;/SPAN&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Thanks for helping . I am able to get entire content into attribute .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have one doubt that i have attribute name called "JSONValue" so that extracted value should be in this name but the flowfile content saves into the attribute&amp;nbsp; "JSONValue.&lt;STRONG&gt;0&lt;/STRONG&gt; "&amp;nbsp; as supposed to create value in JSONValue attribute . Please see screen-print for the same . I had to enable "&lt;SPAN&gt;Include Capture Group 0" as True otherwise the Regex not accepting and expecting value 0 to40 other than false.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JSONAttribute.PNG" style="width: 298px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/30053iCEC055C587DEAEF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="JSONAttribute.PNG" alt="JSONAttribute.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 12:23:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Extract-whole-json-flowfilecontent-small-to-single-attribute/m-p/309055#M223749</guid>
      <dc:creator>adhishankarit</dc:creator>
      <dc:date>2021-01-07T12:23:53Z</dc:date>
    </item>
  </channel>
</rss>

