Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Impala to query Hive table built from JSON
Labels:
- Labels:
-
Apache Hive
-
Apache Impala
-
HDFS
New Contributor
Created on ‎01-14-2019 10:18 AM - edited ‎09-16-2022 07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to understand if this use case is possible. I have a json file that I want to build a hive table with. Here is an example of what I could use to do that - https://pkghosh.wordpress.com/2012/05/06/hive-plays-well-with-json/ .
However, once built, I would like to query using impala as below or am I restricted to using Hive queries for sushc tables?
SELECT b.blogID, c.email FROM comments a LATERAL VIEW json_tuple(a.value, 'blogID', 'contact') b AS blogID, contact LATERAL VIEW json_tuple(b.contact, 'email', 'website') c AS email, website WHERE b.blogID='64FY4D0B28';
1 REPLY 1
Super Guru
Created ‎01-15-2019 10:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
LATERAL VIEW is not available in Impala yet, see below link:
https://www.cloudera.com/documentation/enterprise/latest/topics/impala_langref_unsupported.html#lang...
Currently only Hive supports it.
https://www.cloudera.com/documentation/enterprise/latest/topics/impala_langref_unsupported.html#lang...
Currently only Hive supports it.
