摘要: ### 1. coalesce函数 [coalesce(expr1, expr2, ...) - Returns the first non-null argument if exists. Otherwise, null.](https://spark.apache.org/docs/latest 阅读全文
posted @ 2023-04-12 17:43 ttttttian 阅读(74) 评论(0) 推荐(0)
摘要: ## 1. 背景 已知数据集为: ![](https://img2023.cnblogs.com/blog/2511413/202304/2511413-20230412164847357-1587134933.png) 目的: 计算每个uid的连续活跃天数,并且每一段活跃期内的开始时间和结束时间 阅读全文
posted @ 2023-04-12 17:17 ttttttian 阅读(575) 评论(0) 推荐(0)
摘要: 转载自:[SQL千字总结:如何更好的操练你手上的时间数据](https://mp.weixin.qq.com/s?__biz=MzU5MjkxMDk4Mg==&mid=2247485087&idx=1&sn=07df4d6c33236d05aa8f73f00f51a801&chksm=fe19c97 阅读全文
posted @ 2023-04-12 16:05 ttttttian 阅读(64) 评论(0) 推荐(0)
摘要: ## 1. 背景 有一个这样的数据集:字段和字段的值是两列 ![](https://img2023.cnblogs.com/blog/2511413/202304/2511413-20230412135038294-948703724.png) 目的是将这个数据转换成规整的一个特征是一列的数据: ! 阅读全文
posted @ 2023-04-12 15:22 ttttttian 阅读(463) 评论(0) 推荐(0)