- 博客(20)
- 收藏
- 关注
转载 spark compact on table
实现 Compact table command要求: 添加 compact table 命令,用于合并小文件,例如表 test1 总共有 50000 个文件,每个 1MB,通过该命令,合成为 500 个文件,每个约 100MB。 语法: COMPACT TABLE table_identify [partitionSpec] [INTO fileNum FILES]; 说明:基本要求是完成以下功能:COMPACT TABLE test1 INTO 500 FILES; 如果添加 parti
2022-05-22 23:09:24
264
1
原创 Hive 基础实践
目的:简单hive SQL 实践数据数据解释t_user 观众表(6000+ 条数据)字段为:UserID, Sex, Age, Occupation, Zipcode 字段中文解释:用户 id,性别,年龄,职业,邮编 t_movie 电影表(共 3000+ 条数据)字段为:MovieID, MovieName, MovieType 字段中文解释:电影 ID,电影名,电影类型 t_rating 影评表(100 万 + 条数据)字段为:UserID, MovieID
2022-04-03 16:41:38
1912
原创 hive left join on 中是否可以加入限制条件
背景:hive 中使用 left join 时,是否可以在 on 条件中中加入限制条件。结论:不可以,但是在inner join 中是可以的。create table test.test_no_part (id int ,name string);insert overwrite table test.test_no_part VALUES (1,'a'),(2,'b'),(3,'c');create table test.test_no_part_b (id int ,name stri
2021-07-21 17:07:41
950
原创 hive null and empty string--- 系列(四)-- ORCFile
目的:预将hive中 null 与empty string 统一,便捷后续开发问题:orc 文件 使用SET SERDEPROPERTIES('serialization.null.format' = '') 失效解决方案:探索 null 再各个file_format 的存储方式RCFile(一)原始状态create table test.rcfile (id int ,name string) STORED AS rcfile;show create table test....
2021-06-11 17:18:44
562
3
原创 hive null and empty string--- 系列(三)-- SeqFile
目的:预将hive中 null 与empty string 统一,便捷后续开发问题:orc 文件 使用SET SERDEPROPERTIES('serialization.null.format' = '') 失效解决方案:探索 null 再各个file_format 的存储方式
2021-06-11 17:06:33
419
原创 hive null and empty string--- 系列(二)-- RCFile
目的:预将hive中 null 与empty string 统一,便捷后续开发问题:orc 文件 使用 SET SERDEPROPERTIES('serialization.null.format' = '') 失效解决方案:探索 null 再各个file_format 的存储方式RCFile(一)原始状态...
2021-06-11 15:58:15
256
1
原创 hive null and empty string--- 系列(一)-- TextFile
目的:预将hive中 null 与empty string 统一,便捷后续开发问题:orc 文件 使用 SET SERDEPROPERTIES('serialization.null.format' = '') 失效解决方案
2021-06-11 14:42:49
240
原创 hive row_number 使用注意点
Row_number 是hive常用的窗口函数之一,目的:分组排序。场景:order by value, value 值重复执行行,连续两次使用 row_number ,结果会不如所愿。
2021-06-07 11:09:02
1428
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人