Hive常用命令

Hive常用命令

ID:41402391

大小:73.00 KB

頁數(shù):4頁

時(shí)間:2019-08-24

Hive常用命令_第1頁
Hive常用命令_第2頁
Hive常用命令_第3頁
Hive常用命令_第4頁
資源描述:

《Hive常用命令》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。

1、Hive常用命令:1、查看數(shù)據(jù)庫showdatabases;//查看已經(jīng)存在的數(shù)據(jù)庫describedatabasetest;//查看某個(gè)已經(jīng)存在的數(shù)據(jù)庫2、創(chuàng)建數(shù)據(jù)庫createdatabasetest;createdatabaseifnotexiststest;createdatabasetest2location'/user/hadoop/temp';//制定數(shù)據(jù)庫創(chuàng)建的目錄3、刪除數(shù)據(jù)庫dropdatabaseifexiststest1cascade;4、切換當(dāng)前工作的數(shù)據(jù)庫usetest2;5、查看數(shù)據(jù)庫中的表s

2、howtables;//查看當(dāng)前工作的數(shù)據(jù)庫中的表showtablesintest3;//查看數(shù)據(jù)庫test3中的表6、創(chuàng)建表createtableifnotexiststest.student(namestringcomment'studentname',ageintcomment'studentage',coursearray,bodymap,addressstruct)comment'thein

3、foofstudent'//表的備注rowformatdelimitedfieldsterminatedby'