摘要:
1.默认存储格式为:纯文本 stored as textfile; 2.二进制存储的格式 顺序文件,avro文件,parquet文件,rcfile文件,orcfile文件。 3.转存parquet格式 hive>create table hive.stocks_parquet stored as p 阅读全文
摘要:
0.创建数据库 hive>create table hive.test(id int); hive>load data local inpath '/home/hyxy/test_order.txt' into table hive.test; 1.order by 全局排序 hive>select 阅读全文
摘要:
表的修改 1.alter table 修改表的元数据: a.修改表名称 hive>alter table student rename to student1; b.修改表分区 hive>alter table hive.logs add partition (dt='2018-9-1',count 阅读全文
摘要:
含义:实质是将数据分成不同的文件。hive中的分桶和hadoop中的reduce个数相同。 首先设置采用分桶: hive>set hive.enforce.bucketing=true; hive>create table buckets_users(id int,name string) clus 阅读全文