Json parsing with Hive
In this blog, we will see how to parse Json data in hive and perform sql queries on top of this data.
Copy and paste below json data and save it as bloger.json:
Move data into hdfs using below command.
hdfs dfs -put bloger.json /tmp/sample/
Log into hive and create table blog
CREATE EXTERNAL TABLE blog(value STRING);
Load data into table blog from hdfs
load data inpath '/tmp/sample/' into table blog;
Now, data is loaded into hive. Use below queries to access the json data in tabular format.