Hive 常用操作

2021-06-11 22:17:27 字數 612 閱讀 6685

hive -f script.q                              可以直接執行在指令碼中的命令   

hive -e 'select * from users'           直接執行sql語句

hive -s -e 'select * from users'       靜默的方式執行,不顯示輸入資訊只顯示輸出結果

hive  -v                                                將會列印所執行的sql語句

hive -h 192.169.30.6 -p 10000        連線遠端的hive server

hive --service hiveserver                   啟動hiveserver

hive -hiveconf  mapred.job.tracker=local   設定本地形式的mapreduce

hive 常用操作

1。建立表 內部表 create table ifnot exists hibernate.student id string age string name string row format delimited fields terminated by t 外部表create external ...

Hive常用操作

1.1 建立表 建立文字檔案create table fantj.t3 id int,name string,age int row format delimited fields terminated by stored as textfile hive create table fantj.t3...

Hive常用操作

1.1 建立表 建立文字檔案create table fantj.t3 id int,name string,age int row format delimited fields terminated by stored as textfile 複製 hive create table fantj...