<?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: Convert Json to sql format in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200173#M162201</link>
    <description>&lt;P&gt;Here is a community answer on how to flatten your JSON data: &lt;A href="https://community.hortonworks.com/questions/54314/can-we-flatten-complex-json-file-using-nifi.html" target="_blank"&gt;https://community.hortonworks.com/questions/54314/can-we-flatten-complex-json-file-using-nifi.html&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2017 15:26:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-09-25T15:26:18Z</dc:date>
    <item>
      <title>Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200172#M162200</link>
      <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/40501-json.txt"&gt;json.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to insert the following json format to SQL. Since they are not in the same level so it can be challenged. Any thoughts please?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SJ&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 11:36:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200172#M162200</guid>
      <dc:creator>Sanaz_janbakhsh</dc:creator>
      <dc:date>2017-09-25T11:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200173#M162201</link>
      <description>&lt;P&gt;Here is a community answer on how to flatten your JSON data: &lt;A href="https://community.hortonworks.com/questions/54314/can-we-flatten-complex-json-file-using-nifi.html" target="_blank"&gt;https://community.hortonworks.com/questions/54314/can-we-flatten-complex-json-file-using-nifi.html&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 15:26:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200173#M162201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-25T15:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200174#M162202</link>
      <description>&lt;P&gt;Check out HW Data Flow(Nifi). I believe it has some processors which can convert JSON object to flow-file and flow-file to SQL(I guess you want to insert into Hive).&lt;/P&gt;&lt;P&gt;Processor: ConvertJSONToSQL&lt;/P&gt;&lt;P&gt;Description: &lt;A href="https://nifi.apache.org/docs.html"&gt;https://nifi.apache.org/docs.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 01:21:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200174#M162202</guid>
      <dc:creator>shashant_panwar</dc:creator>
      <dc:date>2017-09-26T01:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200175#M162203</link>
      <description>&lt;P&gt;Hi @&lt;A href="https://community.hortonworks.com/users/11035/sanazjanbakhsh.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Sanaz Janbakhsh&lt;BR /&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;U&gt;Prepare
INSERT/UPDATE statements:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you
are having array inside your json message,if you have array in your json file
then you need to flatten out json message before ConvertJSONToSQL processor as
it expects flat json message to prepare INSERT/UPDATE statements.I tried
with your data There
are 2 ways to prepare INSERT/UPDATE statements for PutSQL processor.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Method1:-
Using JSONToSQL to prepare INSERT/UPDATE:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Input:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{
  "applicationID": "9",
  "applicationName": "Sensors",
  "nodeName": "XXXX",
  "devEUI": "XX",
  "rxInfo": [
    {
      "mac": "647fdafffe00416b",
      "time": "2017-07-19T21:39:35Z",
      "rssi": -1,
      "loRaSNR": XXX,
      "name": "SaroshGateway",
      "latitude": 51.0216123,
      "longitude": -114.039802,
      "altitude": 0
    }
  ],
  "txInfo": {
    "frequency": 902300000,
    "dataRate": {
      "modulation": "LORA",
      "bandwidth": 125,
      "spreadFactor": 10
    },
    "adr": true,
    "codeRate": "4/5"
  },
  "fCnt": 7,
  "fPort": 1,
  "data": "IA=="
}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Flattening Base
Level Json data:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;First we need to &lt;STRONG&gt;flatten out &lt;/STRONG&gt;the &lt;STRONG&gt;base fields&lt;/STRONG&gt; which are &lt;STRONG&gt;not
in Array&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;To flatten Json message in nifi we are having&lt;STRONG&gt; JoltTransformJSON
&lt;/STRONG&gt;processor which will do flattening the json file.&lt;/P&gt;&lt;P&gt;You can test out flattening json on &lt;A href="http://jolt-demo.appspot.com" target="_blank" rel="nofollow noopener noreferrer"&gt;http://jolt-demo.appspot.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Use the Jolt Specification below to flatten the base
fields:-&lt;/P&gt;&lt;PRE&gt;[
  {
    "operation": "shift",
    "spec": {
      "*": "&amp;amp;",
      "txInfo": {
        "*": "tI-&amp;amp;",
        "dataRate": {
          "*": "dR&amp;amp;"
        }
      }
    }
  }
  ]


&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Output:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{
"applicationID": "9",
"applicationName": "Sensors",
"nodeName": "XXXX",
"devEUI": "XX",
"rxInfo": [{
"mac": "647fdafffe00416b",
"time": "2017-07-19T21:39:35Z",
"rssi": -1,
"loRaSNR": "XXX",
"name": "SaroshGateway",
"latitude": 51.0216123,
"longitude": -114.039802,
"altitude": 0
}],
"tI-frequency": 902300000,--there is tI before frequency because in jolt i have given "*": "tI-&amp;amp;"
"dRmodulation": "LORA",--same with dR also i have given "*": "dR&amp;amp;" 
"dRbandwidth": 125,
"dRspreadFactor": 10,
"tI-adr": true,
"tI-codeRate": "4/5",
"fCnt": 7,
"fPort": 1,
"data": "IA=="
}&lt;/PRE&gt;&lt;P&gt;In this step we have &lt;STRONG&gt;flatten all the base fields&lt;/STRONG&gt; in json
message except array.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;jolt configs:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40524-jolt-config.png" style="width: 772px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17558i8BE55F7CD77D147E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40524-jolt-config.png" alt="40524-jolt-config.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Extract Attributes
for Flatten Json Fileds using EvaluateJsonPath:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In this step use the Destination property as &lt;STRONG&gt;flowfile-attribute&lt;/STRONG&gt; so that we can
extract the content of the json message to attributes.&lt;/P&gt;&lt;P&gt;Give all the attribute names which &lt;STRONG&gt;are not part of array  &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;"rxInfo": [{
"mac": "647fdafffe00416b",
"time": "2017-07-19T21:39:35Z",
"rssi": -1,
"loRaSNR": "XXX",
"name": "SaroshGateway",
"latitude": 51.0216123,
"longitude": -114.039802,
"altitude": 0
}]&lt;/PRE&gt;&lt;P&gt;For all the other &lt;STRONG&gt;data&lt;/STRONG&gt; in&lt;STRONG&gt; json message&lt;/STRONG&gt; add properties to the
by clicking &lt;STRONG&gt;+ symbol on top right &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Add properties like below&lt;/P&gt;&lt;PRE&gt;applicationID as $. applicationID &lt;/PRE&gt;&lt;P&gt;Do
the &lt;STRONG&gt;same thing&lt;/STRONG&gt; for&lt;STRONG&gt; all the other attributes except for array elements&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EvaluateJson configs:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40525-eval-sql.png" style="width: 786px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17559iA890AC6150EA1A00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40525-eval-sql.png" alt="40525-eval-sql.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Split Array using
SplitJson Processor:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We are having array which we haven’t transformed yet so use
splitjson processor and property for JsonPath Expression as &lt;STRONG&gt;$.rxInfo. &lt;/STRONG&gt;It will splits the json array
and flatten json message we are having as a flowfile now.&lt;/P&gt;&lt;P&gt;Once we got flatten json message extract all the values of
message to attributes by using evaluate json path processor as we did before.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40526-split-sql.png" style="width: 662px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17560i284444FFFB53D464/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40526-split-sql.png" alt="40526-split-sql.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;AttributesToJSON
Processor:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For every &lt;STRONG&gt;flowfile&lt;/STRONG&gt; we are having &lt;STRONG&gt;all your json message&lt;/STRONG&gt; data
as attributes now so use Attributestojson processor to &lt;STRONG&gt;get all the attributes&lt;/STRONG&gt;
into json message as this processor will result&lt;STRONG&gt; flatten json message&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;In &lt;STRONG&gt;AttributesList property&lt;/STRONG&gt; give all the &lt;STRONG&gt;list of attributes&lt;/STRONG&gt;
that you are thinking to make them as &lt;STRONG&gt;json&lt;/STRONG&gt; message.&lt;/P&gt;&lt;PRE&gt;nodeName,fPort,data,fCnt,devEUI,ri_altitude,tI-frequency,applicationID,applicationName,ri_loRaSNR,ri_time,ri_name,dRbandwidth,ri_latitude,dRmodulation,dRspreadFactor,tI-codeRate,tI-adr,ri_mac,ri_rssi,ri_longitude&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Output:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{
"nodeName": "XXXX",
"fPort": "1",
"data": "IA==",
"fCnt": "7",
"ri_loRaSNR": "XXX",
"devEUI": "XX",
"ri_time": "2017-07-19T21:39:35Z",
"ri_name": "SaroshGateway",
"dRbandwidth": "125",
"ri_latitude": "51.0216123",
"dRmodulation": "LORA",
"dRspreadFactor": "10",
"ri_altitude": "0",
"tI-frequency": "902300000",
"tI-codeRate": "4/5",
"tI-adr": "true",
"ri_mac": "647fdafffe00416b",
"applicationID": "9",
"ri_rssi": "-1",
"applicationName": "Sensors",
"ri_longitude": "-114.039802"
}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;ConvertJSONToSQL
processor:- &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Right now we are having flatten json message we can make use JSONToSQL processor to prepare INSERT/UPDATE statements, as
&lt;STRONG&gt;keep in mind&lt;/STRONG&gt; I have &lt;STRONG&gt;renamed&lt;/STRONG&gt; the &lt;STRONG&gt;array&lt;/STRONG&gt; and some other message data you can
change the&lt;STRONG&gt; attribute value in evaluate json path (or) in jolt transform
processors&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Method2:- Replace
text to prepare INSERT/UPDATE statements&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As my flow screenshot shows Use&lt;/P&gt;&lt;P&gt;Replace text processor after you got all the message
contents as flowfile attributes(i.e after Extract Attributes for Json Array
data) processor &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Replace text Processor Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We are have all the contents of json message to attributes
for each flow file so use those attributes inside replace text processor and
change the following properties&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Replacement Value&lt;/STRONG&gt; property to&lt;/P&gt;&lt;PRE&gt;INSERT INTO table_name (nodeName,fPort,....) VALUES (${nodeName},${fPort},....)&lt;/PRE&gt;&lt;P&gt;Here we are preparing insert sql statement  and replacing with attribute values as ${nodeName}
returns the value associated with the flowfile.&lt;/P&gt;&lt;P&gt;Output:-&lt;/P&gt;&lt;P&gt;INSERT INTO table_name (nodeName,fPort,....) VALUES (XXXX,
1,....)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ReplaceText Config:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40527-replace-sql.png" style="width: 919px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17561i877C208FF907FAE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40527-replace-sql.png" alt="40527-replace-sql.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Right now &lt;/STRONG&gt;we have &lt;STRONG&gt;prepared insert and update&lt;/STRONG&gt; statements and&lt;STRONG&gt;
replaced all the attributes&lt;/STRONG&gt; with values associated with the ff.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;PutSQL:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;From &lt;STRONG&gt;both methods&lt;/STRONG&gt; will prepare &lt;STRONG&gt;INSERT/UPDATE&lt;/STRONG&gt; statements then use&lt;STRONG&gt; PutSQL&lt;/STRONG&gt; processor and &lt;STRONG&gt;Configure&lt;/STRONG&gt; the connection pool and &lt;STRONG&gt;auto terminate
success&lt;/STRONG&gt; message. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Flow screenshot:-&lt;BR /&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40528-flow-sql.png" style="width: 1228px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17562i62FFBCC9D5AED8FA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40528-flow-sql.png" alt="40528-flow-sql.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Take reference as my &lt;STRONG&gt;screenshot&lt;/STRONG&gt; and &lt;STRONG&gt;make sure&lt;/STRONG&gt; you have given &lt;STRONG&gt;Correct Relations&lt;/STRONG&gt;(like success,split,matched...) to  the &lt;STRONG&gt;next processors&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Hope this helps..!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:45:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200175#M162203</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T05:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200176#M162204</link>
      <description>Hi Yash,&lt;P&gt;That's really great help. I followed your instructions and could flattened the Json format. Just have a quick question, since we are evaluate the message in two steps (arrays and not array one) how can I merge them together to make sure the full falttened Json message is created.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 05:27:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200176#M162204</guid>
      <dc:creator>Sanaz_janbakhsh</dc:creator>
      <dc:date>2017-09-27T05:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200177#M162205</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11035/sanazjanbakhsh.html" nodeid="11035" target="_blank"&gt;@Sanaz Janbakhsh&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;Sure, if you are following &lt;STRONG&gt;Method1&lt;/STRONG&gt; then use &lt;STRONG&gt;AttributesToJson&lt;/STRONG&gt; processor as we are having all the json message data as attributes of the flowfile.&lt;/P&gt;&lt;P&gt;In &lt;STRONG&gt;AttributesList property&lt;/STRONG&gt; give all the &lt;STRONG&gt;list of attributes&lt;/STRONG&gt; that you are thinking to make them as &lt;STRONG&gt;json&lt;/STRONG&gt; message.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;AttributesToJson processor configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40543-attributestojson-values.png" style="width: 1142px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17557i651962305E20F62C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40543-attributestojson-values.png" alt="40543-attributestojson-values.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;once you have given all the required attributes in Attributes List property then the success relation of the processor to ConvertJSONToSQL processor.&lt;/P&gt;&lt;P&gt;The output of &lt;B&gt;AttributesToJson &lt;/B&gt;should be a flatten json message as this processor converts all the attributes that are listed to a flatten json message.&lt;/P&gt;&lt;P&gt;Once we got flatten json message then ConvertJSONtoSQL processor will prepare INSERT/UPDATE statements to it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:-&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;
&lt;/OL&gt;&lt;PRE&gt;{&lt;BR /&gt;"nodeName":"XXXX",&lt;BR /&gt;"fPort":"1",&lt;BR /&gt;"data":"IA==",&lt;BR /&gt;"fCnt":"7",&lt;BR /&gt;"ri_loRaSNR":"XXX",&lt;BR /&gt;"devEUI":"XX",&lt;BR /&gt;"ri_time":"2017-07-19T21:39:35Z",&lt;BR /&gt;"ri_name":"SaroshGateway",&lt;BR /&gt;"dRbandwidth":"125",&lt;BR /&gt;"ri_latitude":"51.0216123",&lt;BR /&gt;"dRmodulation":"LORA",&lt;BR /&gt;"dRspreadFactor":"10",&lt;BR /&gt;"ri_altitude":"0",&lt;BR /&gt;"tI-frequency":"902300000",&lt;BR /&gt;"tI-codeRate":"4/5",&lt;BR /&gt;"tI-adr":"true",&lt;BR /&gt;"ri_mac":"647fdafffe00416b",&lt;BR /&gt;"applicationID":"9",&lt;BR /&gt;"ri_rssi":"-1",&lt;BR /&gt;"applicationName":"Sensors",&lt;BR /&gt;"ri_longitude":"-114.039802"&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;*validate your&lt;B&gt; &lt;/B&gt;attributes to json processor output with above output message.&lt;/P&gt;&lt;P&gt;&lt;B&gt;If you are following Method2:-&lt;/B&gt;&lt;/P&gt;&lt;P&gt;let's have a look on replace text processor configs, as i attached screenshots in the above answer to prepare INSERT/UPDATE statements and replacing all the attribute values in sql statements.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:44:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200177#M162205</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T05:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200178#M162206</link>
      <description>&lt;P&gt;Hi Shu,&lt;/P&gt;&lt;P&gt;I followed your advice. Please find the screenshot. On the green arrow I can get the whole message which is not flattened.. On the red one I get only the array one that I split and not all.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/40551-untitled.png"&gt;untitled.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I add the following in the "attrbuteToJson" processor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;applicationID,applicationName,nodeName,devEUI,mac,time,rssi,loRaSNR,name,latitude,longitude,altitude,tI-frequency,dRmodulation,dRbandwidth,dRspreadFactor,tI-adr,tI-codeRate,fCnt,fPort,data&lt;/P&gt;Any thoughts please?</description>
      <pubDate>Wed, 27 Sep 2017 11:04:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200178#M162206</guid>
      <dc:creator>Sanaz_janbakhsh</dc:creator>
      <dc:date>2017-09-27T11:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200179#M162207</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11035/sanazjanbakhsh.html" nodeid="11035" target="_blank"&gt;@Sanaz Janbakhsh&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;for sure this behaviour is because of your &lt;STRONG&gt;Destination property&lt;/STRONG&gt; in&lt;STRONG&gt; AttributestoJson&lt;/STRONG&gt; processor &lt;STRONG&gt;default &lt;/STRONG&gt; will be&lt;STRONG&gt; flowfile-attribute&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;but we need to &lt;STRONG&gt;change that property&lt;/STRONG&gt; to&lt;/P&gt;&lt;PRE&gt;flowfile-content&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Attributestojson configs Screnshot:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;change the below highlighted property you are using flowfile-attribute that means this processor keeps all the list of attributes to ff attributes&lt;/P&gt;&lt;P&gt;but we need all the attributes needs to be in flowfile-content.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40585-attrjs.png" style="width: 660px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17556iF4B4959092BD81F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40585-attrjs.png" alt="40585-attrjs.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this Helps....!!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:44:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200179#M162207</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T05:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to sql format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200180#M162208</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Could you please share this templates ?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 19:29:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-sql-format/m-p/200180#M162208</guid>
      <dc:creator>mani_nathan08</dc:creator>
      <dc:date>2018-11-15T19:29:14Z</dc:date>
    </item>
  </channel>
</rss>

