<?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 JSON to SQL in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118325#M38743</link>
    <description>&lt;P&gt;I have a JSON array that I'm attempting to input to ConvertJSONToSQL, however I'm getting the following error:&lt;/P&gt;&lt;P&gt;"None of the fields in the JSON map to the columns defined"&lt;/P&gt;&lt;P&gt;I would like the process to be dynamic rather than use the AttributesToJSON process. Is that possible? My Table does have the EndTime, H1526728411, etc, columns. My JSON looks like:&lt;/P&gt;&lt;PRE&gt;{
  "Table":{
    "TableName":"HH_CELL_VQI",
    "EndTime":"2016-07-12T05:30:00-06:00",
    "H1526728411":"0",
    "H1526728412":"0",
    "H1526728413":"0",
    "H1526728414":"0",
    "H1526728415":"0",
    "H1526728416":"0",
    "H1526728417":"0",
    "H1526728418":"0",
    "H1526728419":"0",
    "H1526728420":"0"
  }
}
&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Aug 2016 23:57:03 GMT</pubDate>
    <dc:creator>hans_feldmann</dc:creator>
    <dc:date>2016-08-24T23:57:03Z</dc:date>
    <item>
      <title>JSON to SQL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118325#M38743</link>
      <description>&lt;P&gt;I have a JSON array that I'm attempting to input to ConvertJSONToSQL, however I'm getting the following error:&lt;/P&gt;&lt;P&gt;"None of the fields in the JSON map to the columns defined"&lt;/P&gt;&lt;P&gt;I would like the process to be dynamic rather than use the AttributesToJSON process. Is that possible? My Table does have the EndTime, H1526728411, etc, columns. My JSON looks like:&lt;/P&gt;&lt;PRE&gt;{
  "Table":{
    "TableName":"HH_CELL_VQI",
    "EndTime":"2016-07-12T05:30:00-06:00",
    "H1526728411":"0",
    "H1526728412":"0",
    "H1526728413":"0",
    "H1526728414":"0",
    "H1526728415":"0",
    "H1526728416":"0",
    "H1526728417":"0",
    "H1526728418":"0",
    "H1526728419":"0",
    "H1526728420":"0"
  }
}
&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Aug 2016 23:57:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118325#M38743</guid>
      <dc:creator>hans_feldmann</dc:creator>
      <dc:date>2016-08-24T23:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to SQL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118326#M38744</link>
      <description>&lt;P&gt;The JSON object has to be "flat", meaning all your column fields have to be at the top level of the JSON object. Yours are nested inside a "Table" field. You can use EvaluateJsonPath with a path of $.Table to get the flat JSON object.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 00:32:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118326#M38744</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2016-08-25T00:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to SQL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118327#M38745</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11952/hansfeldmann.html" nodeid="11952"&gt;@Hans Feldmann&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One way I parsed my json was to convert it to Avro. So basically, after getting rid of special characters from json using "replaceText" processor, I sent it to "inferAvroSchema". Then used convertJsonToAvro using the inferred schema and then wrote that to HDFS where I had a table and read it in Hive.&lt;/P&gt;&lt;P&gt;Another way is to use Json hive Serde. That's actually much easier. Check this out.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/rcongiu/Hive-JSON-Serde" target="_blank"&gt;https://github.com/rcongiu/Hive-JSON-Serde&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 00:49:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118327#M38745</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2016-08-25T00:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to SQL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118328#M38746</link>
      <description>&lt;P&gt;
	Why don't you use this tool: 
	&lt;A href="https://sqlify.io/convert/json/to/sql"&gt;JSON to SQL&lt;/A&gt;, it will automatically flatten the JSON data for you, so there's no extra work or coding required.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 04:15:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-to-SQL/m-p/118328#M38746</guid>
      <dc:creator>boudra_moha</dc:creator>
      <dc:date>2017-08-16T04:15:05Z</dc:date>
    </item>
  </channel>
</rss>

