課程
/云計算&大數據
/大數據
/走近大數據之Hive入門
sample_data表的結構和內容能貼一下嘛?沒有這個例子沒法跟著做
2018-03-17
源自:走近大數據之Hive入門 6-1
正在回答
1 建表sample_data
create table sample_data(sid int, sname string, gender string, language int, math int, english int)row format delimited fields terminated by ',' stored as textfile;
2 數據/hadoop/hive/sample_data.txt
1,Tom,M,60,80,962,Mary,F,88,65,903,Jerry,M,90,85,884,Rose,M,79,85,905,Mike,F,90,88,946,John,F,85,80,807,Scott,F,70,90,808,King,F,90,88,759,Kitty,M,88,77,9510,James,M,77,80,94
3 導入數據
load data local inpath '/hadoop/hive/sample_data.txt' into table sample_data;
舉報
Hive是基于HDFS的數據倉庫,教程將向大家介紹Hive的體系結構
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-03-17
1 建表sample_data
create table sample_data
(sid int, sname string, gender string, language int, math int, english int)
row format delimited fields terminated by ',' stored as textfile;
2 數據/hadoop/hive/sample_data.txt
1,Tom,M,60,80,96
2,Mary,F,88,65,90
3,Jerry,M,90,85,88
4,Rose,M,79,85,90
5,Mike,F,90,88,94
6,John,F,85,80,80
7,Scott,F,70,90,80
8,King,F,90,88,75
9,Kitty,M,88,77,95
10,James,M,77,80,94
3 導入數據
load data local inpath '/hadoop/hive/sample_data.txt' into table sample_data;