본문 바로가기

Bigdata 동영상

Hive install QL use [하둡 동영상 강의]

<hive install create table load data select>


Hive download

http://apache.mirror.cdnetworks.com/hive/stable/


 $HIVE_HOME/bin/hive --service metastore

 $HIVE_HOME/bin/hive --service hiveserver


Hive tar xvzf

./bin/hive

hive> create database calebpro;

hive> use calebpro;

hive> create table table01( a string, b int);

hive> show tables;

hive> drop table table01;

hive> show tables;

hive> create table airline_delay ( ....columns..... )

         partitioned by (delayYear int)

         row format delimited 

               fields delimited by ','

               lines terminated by '\n'

               stored as textfile;


hive> load data local inpath '/home/hadoop/1987.csv'

     overwrite into table airline_delay

     partition (delayYear='1987');


hive> select month, UniqueCarrier, count(*) delay_count 

           from airline_delay 

         group by month, uniqueCarrier 

         order by month          


source from : 

1. Programming HIVE - O'REILLY 

2. 시작하세요 하둡 프로그래밍 - 위키북스

3. hive.apache.org

4. 시간 ^^









서평은 나중에 한번 ~~~