Hive Practice Lab 1
welcome one and all to hive learning session 1
In this post we are going to learn very basic of hive
I guess you already install hadoop and hive
if not
Install hadoop using the steps mention here > Hadoop Installation
To install hive please go through these steps > Hive Installation
once you installed both of above we are ready to start our basic learning
Start hadoop cluster>>start-all.sh
>> jps
If you able to see above processes your cluster is started
To check hive version use>>
hive --version
Lets start with Hive DDL
Creating Hive Tables
hive> CREATE TABLE pokes (foo INT, bar STRING);
creates a table called pokes with two columns, the first being an integer and the other a string.
hive> CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING);
creates a table called invites with two columns, the first being an integer and the other a string .third column ds is of string type and it is partitioned column
Browsing through Tables
Now to see tables in our database
use command
hive> SHOW TABLES;
to enlist all the tables ending with "s".
hive> SHOW TABLES '.*s';
to see the list of columns.
>> Describe table name;
we will discuss later more about describe.
feel free to comment and get your query resolved by hadoopquiz team.
Incoming Tags:
Hive, Hive Configuration, Hive Practice, Hive Lab, hadoop hive, learn hive, Hive for beginner, learn hive from basic, Leaning hive, learning hadoop
Subscribe www.hadoopquiz.blogspot.com for more updates
Post a Comment
image video quote pre code