-
*桶表 桶表通過哈希運算,把運算出的相同哈希值放在一起,以減少熱塊 create table bucket_table (name string,age int) clustered by(name)into 5 buckets; ? --五個桶
查看全部 -
>create external table external_student (sid int, sname string, age int) row format delimited fields terminate by ','? location '/input';? ?//創建一個以','為分隔符的外部表,這個外部表與HDFS中/input目錄下的文件相關聯
查看全部 -
創建一個partition表
create table partition_tabel(sid int,sname string) ?partitioned by (gender string) row format delimited fields terminated by ',';
向partition表中添加數據
insert into table partition_table partition(gender='M') select sid,sname from sample_data where gender='M';
查看全部 -
hive -S?
靜默模式,不打印調試信息
hive -e ‘show tables’;
在操作系統命令行下執行hive命令。
hive -S -e ‘show tables’;
在操作系統命令行下執行hive命令(靜默模式
查看全部 -
常見的 Hive CLI 命令:
- 清屏:Ctrl + L 或者 !clear;
- 查看數據倉庫中的數據庫:show databases;
- 查看數據倉庫中的表:show tables;
- 查看表結構:`desc tb_name;`或`describe tb_name;`
- 查看建表語句:`show create table tb_name;`
- 查看數據倉庫中的內置函數:`show functions;`
- 查看 HDFS 上的文件:`dfs -ls hdfs_dir;`
- 執行 Linux 操作系統的命令:`!命令;`
- 執行 SQL 腳本:`source SQL文件`查看全部 -
他將SQL語句轉移成M/R Job然后再Hadoop執行
查看全部 -
hive是基于hadoop的數據倉庫
查看全部 -
hive命令會在執行的目錄下創建metastore_db目錄保存信息
查看全部 -
數據存儲以及管理
查看全部 -
Hive的安裝-遠程模式
查看全部 -
Hive的安裝-本地模式
查看全部 -
Hive的安裝-嵌入模式
查看全部 -
Hive的元數據
查看全部 -
Hive簡介2
查看全部 -
Hive簡介
查看全部
舉報