摘要: select row_number() over(partition by 分区字段 order by 排序字段 desc) rank 阅读全文
posted @ 2019-09-02 10:49 TryMyBest! 阅读(459) 评论(0) 推荐(0)
摘要: hadoop fs -ls hdfs://路径 阅读全文
posted @ 2019-08-30 17:30 TryMyBest! 阅读(359) 评论(0) 推荐(0)
摘要: 先将mysql的数据导入到文件中,再将文件导入到hdfs中。再将hdfs的数据插入到表中 阅读全文
posted @ 2019-08-30 15:03 TryMyBest! 阅读(2314) 评论(0) 推荐(0)
摘要: alter table 数据库名.表名 add partition(分区名=值)location '文件位置/文件名分区名=值'; 阅读全文
posted @ 2019-08-30 14:51 TryMyBest! 阅读(826) 评论(0) 推荐(0)
摘要: regexp '[\\u4E00-\\u9FA5]' 阅读全文
posted @ 2019-08-30 10:08 TryMyBest! 阅读(473) 评论(0) 推荐(0)
摘要: ①将数据放到hdfs制定文件夹下:hadoop fs -put 服务器上的文件存储路径/文件名称.txt hdfs://alg-hdfs/hdfs上路径 ②将hdfs中的数据导入到hive中: load data inpath 'hdfs://alg-hdfs/hdfs上的路径/文件名.txt' o 阅读全文
posted @ 2019-08-30 10:04 TryMyBest! 阅读(2716) 评论(0) 推荐(0)
摘要: durid报表建设,可以方便统计UV 阅读全文
posted @ 2019-08-30 10:00 TryMyBest! 阅读(254) 评论(0) 推荐(0)
摘要: 1.为什么自动调度的任务跑完数后,表中没有数据。过了几个小时后再重启任务跑数,又有了数据? 答:因为依赖的表中有数据延迟,导致依赖的表在调度的那一刻,没有数据,所以后生成的表也没有数据。过了几个小时后,依赖的表中有了数据,这样再重启调度跑数,表中也就有了数据。 2.如何写循环的shell脚本? 答: 阅读全文
posted @ 2019-08-30 09:51 TryMyBest! 阅读(141) 评论(0) 推荐(0)
摘要: 因为数据的存储问题 该表创建时指定的存储格式为parquet,所以count()无法统计 阅读全文
posted @ 2019-08-27 15:45 TryMyBest! 阅读(1473) 评论(1) 推荐(0)
摘要: 数仓建设时,要建历史表,用于保存历史数据,用于日后出问题时,起修复数据的作用。按日期分区,每天都把所有的数据存到当天的分区里 阅读全文
posted @ 2019-08-22 10:44 TryMyBest! 阅读(492) 评论(0) 推荐(0)