Hive作為大數(shù)據(jù)環(huán)境下的數(shù)據(jù)倉庫工具,支持基于hadoop以sql的方式執(zhí)行mapreduce的任務,非常適合對大量的數(shù)據(jù)進行全量的查詢分析。
本文主要講述下hive載cli中如何導入導出數(shù)據(jù):
導入數(shù)據(jù)
第一種方式,直接從本地文件系統(tǒng)導入數(shù)據(jù)
我的本機有一個test1.txt文件,這個文件中有三列數(shù)據(jù),并且每列都是以'\t'為分隔
[root@localhost conf]# cat /usr/tmp/test1.txt1 a1 b12 a2 b23 a3 b34 a4 b
創(chuàng)建數(shù)據(jù)表:
>create table test1(a string,b string,c string) >row format delimited >fields terminated by '\t'>stored as textfile;
導入數(shù)據(jù):
延伸閱讀
- ssh框架 2016-09-30
- 阿里移動安全 [無線安全]玩轉(zhuǎn)無線電——不安全的藍牙鎖 2017-07-26
- 消息隊列NetMQ 原理分析4-Socket、Session、Option和Pipe 2024-03-26
- Selective Search for Object Recognition 論文筆記【圖片目標分割】 2017-07-26
- 詞向量-LRWE模型-更好地識別反義詞同義詞 2017-07-26
- 從棧不平衡問題 理解 calling convention 2017-07-26
- php imagemagick 處理 圖片剪切、壓縮、合并、插入文本、背景色透明 2017-07-26
- Swift實現(xiàn)JSON轉(zhuǎn)Model - HandyJSON使用講解 2017-07-26
- 阿里移動安全 Android端惡意鎖屏勒索應用分析 2017-07-26
- 集合結合數(shù)據(jù)結構來看看(二) 2017-07-26
