posted @ 2021-07-28 16:06
07 2021 档案
摘要:CREATE FUNCTION fu_getwords(@cc VARCHAR(100))RETURNS VARCHAR(100)ASbeginDECLARE @n INT,@i INT,@clearstr VARCHAR(100),@gg VARCHAR(10)SET @n=LEN(@cc)SET
阅读全文
摘要:sdt=`date -d"$(date -d'20210108 ' +'%Y%m01')" +"%Y%m%d"`edt=`date -d "$(date -d '20210104' +'%Y%m%d')" +"%Y%m%d"`echo $sdt,$edttb="tt"while [[ $sdt -l
阅读全文
posted @ 2021-07-28 13:42
摘要:IP转为bigint create function [dbo].[iptobigint](@ipinfo varchar(16)) returns bigint as begin declare @ret bigint if PATINDEX('%[^.0-9]%',@ipinfo)>0 retu
阅读全文
posted @ 2021-07-14 16:43
摘要:explode称之为Hive爆炸函数,意思就是将一行数据炸开。Usage:explode(array/map) explode函数传递的参数必须是一个array或者是map hivescala> spark.sql("select explode(split('41,52,62,35&98','[,
阅读全文
posted @ 2021-07-06 15:39
摘要:随机生成100以内的整数 select top 10 number,ceiling(rand(checksum(newid()))*100) from master.dbo.spt_valueswhere type='p'
阅读全文
posted @ 2021-07-06 14:31
摘要:mysql> SELECT a.user, @i:=@i+1 as id FROM user a,(SELECT @i:=0) b; + + +| user | id |+ + +| hive | 1 || root | 2 || mysql.infoschema | 3 || mysql.sess
阅读全文
posted @ 2021-07-06 14:22
摘要:import org.apache.spark.graphx._import org.apache.spark.rdd.RDDval vertexArray = Array( (1L, ("Alice", 28)), (2L, ("Bob", 27)), (3L, ("Charlie", 65)),
阅读全文
posted @ 2021-07-01 15:13