<?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: Apache Nifi: Insert json data into table as single column data into table after concatenating all the keys and values of json. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364041#M239097</link>
    <description>&lt;P&gt;Hi, SAM. Thank you for response. I am using ListenHTTP to get json data--&amp;gt;ConvertRecord(to validate json) --&amp;gt;SplitJson(to split)--&amp;gt;Now I have individial Json Objects. Now I have concatenate all the keys and values of each json object and insert to a table have single column called JSON_DATA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my input data,&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;"Name"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"Joh&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Age"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Occupation"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"Developer"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;n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&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;]...I want insert each json obj inot each new row as string like this in a snowflake table&amp;nbsp; &amp;nbsp;' {"Name":"Joh&amp;nbsp;","Age":&amp;nbsp;2,"Occupation":"Developer",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Location":&amp;nbsp;"New&amp;nbsp;York","Salary":&amp;nbsp;75780} '&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 17 Feb 2023 04:26:16 GMT</pubDate>
    <dc:creator>praful123</dc:creator>
    <dc:date>2023-02-17T04:26:16Z</dc:date>
    <item>
      <title>Apache Nifi: Insert json data into table as single column data into table after concatenating all the keys and values of json.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/363974#M239092</link>
      <description>&lt;P&gt;Please help design data flow in nifi, I need to insert the incoming JSON data into table which having single column. The condition are I need to concat all the keys and values and insert that data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 16:32:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/363974#M239092</guid>
      <dc:creator>praful123</dc:creator>
      <dc:date>2023-02-16T16:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi: Insert json data into table as single column data into table after concatenating all the keys and values of json.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/363981#M239093</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide sample\example&amp;nbsp; data of the json and how do you expect to save it as ?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 17:36:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/363981#M239093</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-02-16T17:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi: Insert json data into table as single column data into table after concatenating all the keys and values of json.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364041#M239097</link>
      <description>&lt;P&gt;Hi, SAM. Thank you for response. I am using ListenHTTP to get json data--&amp;gt;ConvertRecord(to validate json) --&amp;gt;SplitJson(to split)--&amp;gt;Now I have individial Json Objects. Now I have concatenate all the keys and values of each json object and insert to a table have single column called JSON_DATA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my input data,&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;"Name"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"Joh&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Age"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Occupation"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"Developer"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Location"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&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;]...I want insert each json obj inot each new row as string like this in a snowflake table&amp;nbsp; &amp;nbsp;' {"Name":"Joh&amp;nbsp;","Age":&amp;nbsp;2,"Occupation":"Developer",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Location":&amp;nbsp;"New&amp;nbsp;York","Salary":&amp;nbsp;75780} '&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 17 Feb 2023 04:26:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364041#M239097</guid>
      <dc:creator>praful123</dc:creator>
      <dc:date>2023-02-17T04:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi: Insert json data into table as single column data into table after concatenating all the keys and values of json.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364117#M239103</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for the information , I came across situation before and I'm not sure if there is better way but you can use the following processors after you split to data into individual records :&lt;/P&gt;&lt;P&gt;ExtractText -&amp;gt; PUTSQL&lt;/P&gt;&lt;P&gt;For the ExtractText:&lt;/P&gt;&lt;P&gt;1- Add dynamic Property to capture all the Json Content from incoming flowfile as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_1-1676645774194.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36786i1A8DB9ED48F3B012/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_1-1676645774194.png" alt="SAMSAL_1-1676645774194.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note: You have to be careful with if each record data can be large (&amp;gt; 1024 Chars). In this case you need to look into modifying "&lt;SPAN&gt;Maximum Buffer Size&lt;/SPAN&gt;" and "&lt;SPAN&gt;Maximum Capture Group Length&lt;/SPAN&gt;" accordingly otherwise the data will be truncated.&lt;/P&gt;&lt;P&gt;For the PutSQL: Once you configure the JDBC Connection Pool , you can set the SQL Statement Property with something like this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;insert into myTable (jsonCol) values ('${JsonRecord}')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that helps please accept solution&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 15:08:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364117#M239103</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-02-17T15:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi: Insert json data into table as single column data into table after concatenating all the keys and values of json.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364189#M239122</link>
      <description>&lt;P&gt;Hi SAM, Thank you for response. I am facing one more error, while inserting data into table. Even though i have tables named test4 in my snowflake table, The PUTSQL processor keep telling "The Table 'test4' doesn't exist or not Authorized(I did give permission too). This is my sql statement(INSERT INTO test4 (JSON_DATA) values ('${JsonRecord}').&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="praful123_0-1676871828372.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36794i9ABA0AE700BC405A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="praful123_0-1676871828372.png" alt="praful123_0-1676871828372.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 05:45:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364189#M239122</guid>
      <dc:creator>praful123</dc:creator>
      <dc:date>2023-02-20T05:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi: Insert json data into table as single column data into table after concatenating all the keys and values of json.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364192#M239124</link>
      <description>&lt;P&gt;Hi SAM, Actually it worked for me now. No error now. Thank you for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 06:34:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Insert-json-data-into-table-as-single-column/m-p/364192#M239124</guid>
      <dc:creator>praful123</dc:creator>
      <dc:date>2023-02-20T06:34:59Z</dc:date>
    </item>
  </channel>
</rss>

