摘要: 使用函数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)
摘要: 写hive脚本时,如果hive的过滤条件比较多。可以把过滤条件放到一个参数里。然后把参数放到过滤条件处。这样以后只需要改参数就可以了 阅读全文
posted @ 2019-10-24 18:52 TryMyBest! 阅读(424) 评论(0) 推荐(0)
摘要: linux中. 路径/文件。 表示执行脚本。和sh的功能一样 阅读全文
posted @ 2019-10-23 19:48 TryMyBest! 阅读(269) 评论(0) 推荐(0)