HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to analyze Json data in Hive | Step by steps to process Jsondata

26,476 views October 29, 2015 24:36

Watch on YouTube
ChannelBigdata Spark Online Training

Description from the creator

In this video i have demonstrated How to analyze JSON data in hive?
bigdataanalyst.in
Please follow these steps:
How to analyze json data:

Download from files.cloudera.com/samples/hive-serdes-1.0-SNAP…
copy this file into hive/lib path.

start hadoop and hive


CREATE EXTERNAL TABLE originaldata (created_at STRING,
text STRING,
user STRUCT //place less then here its not accept in the description
screen_name:STRING,
name:STRING,
locations:STRING,
description:STRING,
created_at:STRING,
followers_count:INT,
url:STRING //place greater then here its not accept in the description
) ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe' location '/home/hadoop/work/warehouse/bigsql.db/raw_tables';


create table desiretable as select * from originaldata;

add jar /home/hadoop/work/hive-0.10.0/lib/hive-serdes-1.0-SNAPSHOT.jar;


select * from tablename;
select * from desiretable where user.locations like "%USA%";
select user.name, user.url from desiretable where user.description like "%bigdata%";

If you have any doubt comment below.
Thanks
Your Venu

About this tutorial

Bigdata Spark Online Training published this 24:36 video tutorial on October 29, 2015. It has been watched 26,476 times on YouTube.

Duration
24:36
Published
October 29, 2015
Views
26,476
Likes
143

Share

This tutorial in other languages