11 2019 档案

摘要:function GetLastestPartition(){ GetLastestPartition_tablename='表名'ExecuteHQL "show partitions ${GetLastestPartition_tablename}" | tail -n 1 | cut -d'= 阅读全文
posted @ 2019-11-26 16:26 TryMyBest! 阅读(167) 评论(0) 推荐(0)
摘要:矢量查询(Vectorized query) 每次处理数据时会将1024行数据组成一个batch进行处理,而不是一行一行进行处理,这样能够显著提高执行速度。可以通过设置 Error: Error while processing statement: FAILED: Execution Error, 阅读全文
posted @ 2019-11-19 15:59 TryMyBest! 阅读(304) 评论(0) 推荐(0)
摘要:set hive.exec.dynamic.partition=true;set hive.exec.dynamic.partition.model=nonstrict; 阅读全文
posted @ 2019-11-15 16:12 TryMyBest! 阅读(198) 评论(0) 推荐(0)
摘要:crontab -l | grep 任务名 阅读全文
posted @ 2019-11-15 10:39 TryMyBest! 阅读(868) 评论(0) 推荐(0)
摘要:ALTER TABLE 表名 ADD COLUMNS(字段名 STRING comment '') cascade; 阅读全文
posted @ 2019-11-14 10:16 TryMyBest! 阅读(730) 评论(0) 推荐(0)
摘要:crontab -l | grep 字符串,不用引号 阅读全文
posted @ 2019-11-11 20:38 TryMyBest! 阅读(173) 评论(0) 推荐(0)
摘要:使用函数named_struct 例如named_struct(‘文字’,字段名,'文字’,字段名 ) 阅读全文
posted @ 2019-11-11 15:12 TryMyBest! 阅读(3339) 评论(0) 推荐(0)
摘要:parse_url是用来解析url类型的字符串 阅读全文
posted @ 2019-11-08 11:13 TryMyBest! 阅读(971) 评论(0) 推荐(0)
摘要:炸裂函数 lateral view explode 可以对数组进行炸裂;也可以对map进行炸裂 对map字段进行炸裂:lateral view explode(map字段) aa as ikey1,ivalue1; 对数组字段进行炸裂:lateral view explode(数组字段) aa as 阅读全文
posted @ 2019-11-08 10:25 TryMyBest! 阅读(380) 评论(0) 推荐(0)
摘要:drop table 表名_${YYYYMMDD}; crate table 表名_${YYYYMMDD}; 阅读全文
posted @ 2019-11-02 15:24 TryMyBest! 阅读(130) 评论(0) 推荐(0)
摘要:create table as select 。。。 from。。。 阅读全文
posted @ 2019-11-01 16:59 TryMyBest! 阅读(105) 评论(0) 推荐(0)
摘要:正则替换函数regexp_replace() 阅读全文
posted @ 2019-11-01 16:39 TryMyBest! 阅读(6916) 评论(0) 推荐(0)
摘要:将同个id对应的多行数据,转为一行数据。使用collect_set() group by函数 阅读全文
posted @ 2019-11-01 16:38 TryMyBest! 阅读(531) 评论(0) 推荐(0)
摘要:将字符串类型字段转为map类型字段,使用str_to_map()函数 阅读全文
posted @ 2019-11-01 16:36 TryMyBest! 阅读(663) 评论(0) 推荐(0)