<?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: Getting all NULLS when selecting from a Hive  JSON table in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-all-NULLS-when-selecting-from-a-Hive-JSON-table/m-p/131078#M27184</link>
    <description>&lt;P&gt;I suppose is the issue with loading data.&lt;/P&gt;&lt;P&gt;Try to create external table instead..&lt;/P&gt;&lt;PRE&gt;create EXTERNAL table tweets 
....

row format serde 'org.openx.data.jsonserde.JsonSerDe'
LOCATION '/tmp/tweets_staging/';&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 May 2016 01:46:24 GMT</pubDate>
    <dc:creator>bluesmix</dc:creator>
    <dc:date>2016-05-05T01:46:24Z</dc:date>
    <item>
      <title>Getting all NULLS when selecting from a Hive  JSON table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-all-NULLS-when-selecting-from-a-Hive-JSON-table/m-p/131076#M27182</link>
      <description>&lt;P&gt;I’m trying to get some twitter JSON to show up in Hive and I’m not having any luck. All I get are NULLS returned and no errors. I've tried the native JSON serde as well as the openx serde but get the same results.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD DATA INPATH '/tmp/tweets_staging/‘ OVERWRITE INTO tweets;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ADD JAR /hadoop/json-serde-1.3.8-SNAPSHOT-jar-with-dependencies.jar;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SELECT * FROM tweets LIMIT 100;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4001-9688f87e-f96b-4330-833c-c2e59ab2e9c9.png" style="width: 1063px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22317i6E7C70EF56BFB14D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="4001-9688f87e-f96b-4330-833c-c2e59ab2e9c9.png" alt="4001-9688f87e-f96b-4330-833c-c2e59ab2e9c9.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/4002-tweet-table.txt" target="_blank"&gt;tweet-table.txt&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 09:26:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-all-NULLS-when-selecting-from-a-Hive-JSON-table/m-p/131076#M27182</guid>
      <dc:creator>SQLShaw</dc:creator>
      <dc:date>2019-08-19T09:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all NULLS when selecting from a Hive  JSON table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-all-NULLS-when-selecting-from-a-Hive-JSON-table/m-p/131077#M27183</link>
      <description>&lt;P&gt;You might want to check that the JSON is legitimate. You can do this with Spark (spark-sql). Here's what I'd do in spark-sql:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create temp table over the JSON files&lt;/LI&gt;&lt;LI&gt;See if "select " statement returns desired results&lt;/LI&gt;&lt;LI&gt;Describe the temp table and sanity check the schema against what you were using in Hive&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;To create the temp table in Spark:&lt;/P&gt;&lt;PRE&gt;CREATE TEMPORARY TABLE tweets_temp
USING org.apache.spark.sql.json
OPTIONS (path '[the path to the JSON dataset]')&lt;/PRE&gt;&lt;P&gt;Read more about this feature &lt;A target="_blank" href="https://databricks.com/blog/2015/02/02/an-introduction-to-json-support-in-spark-sql.html"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 21:22:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-all-NULLS-when-selecting-from-a-Hive-JSON-table/m-p/131077#M27183</guid>
      <dc:creator>clukasik</dc:creator>
      <dc:date>2016-05-04T21:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all NULLS when selecting from a Hive  JSON table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-all-NULLS-when-selecting-from-a-Hive-JSON-table/m-p/131078#M27184</link>
      <description>&lt;P&gt;I suppose is the issue with loading data.&lt;/P&gt;&lt;P&gt;Try to create external table instead..&lt;/P&gt;&lt;PRE&gt;create EXTERNAL table tweets 
....

row format serde 'org.openx.data.jsonserde.JsonSerDe'
LOCATION '/tmp/tweets_staging/';&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2016 01:46:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-all-NULLS-when-selecting-from-a-Hive-JSON-table/m-p/131078#M27184</guid>
      <dc:creator>bluesmix</dc:creator>
      <dc:date>2016-05-05T01:46:24Z</dc:date>
    </item>
  </channel>
</rss>

