Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Impala to query Hive table built from JSON

avatar
New Contributor

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

avatar
Super Guru
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.