上一页 1 2 3 4 5 6 ··· 20 下一页
摘要: 1. left semi join 类似 in \exists 的功能,但是更高效 a left join b 若1对多,结果集会出现多条数据,但是left semi join 只会筛选出a表中包含过关联条件的数据不会增加 2. left anti join a left anti join b 的 阅读全文
posted @ 2022-05-31 17:46 star521 阅读(2487) 评论(0) 推荐(0) 编辑
摘要: 抽取insert 的行数插入到另一个文本 https://www.runoob.com/linux/linux-comm-grep.html cat sxxxxx-20220330-bak.sql | grep -i insert >> sxxxx.sql 抽取某张表相关的insert语句 cat 阅读全文
posted @ 2022-05-31 17:37 star521 阅读(274) 评论(0) 推荐(0) 编辑
摘要: --自动生成json数据 select TABLE_NAME , concat (',',COLUMN_NAME) COLUMN_NAME , case when t.data_TYPE in('varchar','text') then 'string' when t.data_TYPE = 'd 阅读全文
posted @ 2022-05-31 17:27 star521 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1.collect_set 分组组合数组(数组内去重) collect_setselect code ,collect_set(tenant_id) from dim_mkt_event group by code;2.array_contains 数组中是否包含 ,返回布尔类型 select co 阅读全文
posted @ 2022-05-31 16:50 star521 阅读(2043) 评论(0) 推荐(0) 编辑
摘要: hive 上卷 rollup with cube grouping sets https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C+Grouping+and+Rollup 阅读全文
posted @ 2022-05-30 21:04 star521 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 040.mysql-datax从hive导入mysql报错:(表情包字符) java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x87\xF0\x9F...' for column 'member_name 解决方法 :jdbc链 阅读全文
posted @ 2022-04-25 19:22 star521 阅读(404) 评论(0) 推荐(0) 编辑
摘要: (case when b.max_coupon_id is not null then -(floor(abs(a.target_points)/a.coupon_num)+ pmod(a.target_points,a.coupon_num)) when b.max_coupon_id is nu 阅读全文
posted @ 2022-04-19 14:23 star521 阅读(58) 评论(0) 推荐(0) 编辑
摘要: subline下载 https://www.php.cn/tool/sublime/413320.html 然后下载 SqlBeautifier 格式化快捷键 开启大写 ctr+k ctr+F 阅读全文
posted @ 2022-04-19 11:34 star521 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 创建.bat文件 文件需要放在的目录下>需要创建的文件名称 执行bat文件 mkdirjsonfile.bat C:\Users\Admin\Desktop\云\see>t_order.json C:\Users\Admin\Desktop\云\see>t_order_discount.json C 阅读全文
posted @ 2022-04-01 14:01 star521 阅读(234) 评论(0) 推荐(0) 编辑
摘要: tst00表 tst01表 CREATE TABLE `tst00` ( `id` int NOT NULL AUTO_INCREMENT, `json_v` text COLLATE utf8mb4_general_ci, `num` int DEFAULT NULL, PRIMARY KEY ( 阅读全文
posted @ 2022-03-24 10:41 star521 阅读(321) 评论(0) 推荐(0) 编辑
摘要: hive- date_format(b.month_start_date_entry ,'yyyyMMdd') mysql- DATE_FORMAT(create_time,'%Y%m%d') 阅读全文
posted @ 2022-03-11 18:53 star521 阅读(407) 评论(2) 推荐(0) 编辑
摘要: hive-sort_arry实现字段横向比较,并取出最大值 先把多字段组成数组,再数组排序,取出最后一个即为最大值 sort_array(array(nvl(is_receive_recharge,0),nvl(is_receive_coupon,0),nvl(is_receive_points,0 阅读全文
posted @ 2022-03-11 18:50 star521 阅读(462) 评论(0) 推荐(0) 编辑
摘要: hive-hive生成一段连续日期 select pos ,date_add(start_date,pos) as stat_date from (select '${entryDate}' as start_date, '${abortDate}' as end_date) temp latera 阅读全文
posted @ 2022-03-11 18:46 star521 阅读(348) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/airnew/p/9788122.html 不能直接通过 create table as select 创建表,对改变表结构丢失表备注信息(分区表) create table dwd_cstm_points_record_mi_back__202203 阅读全文
posted @ 2022-03-11 18:39 star521 阅读(197) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/zz-ksw/p/12917693.html 阅读全文
posted @ 2021-11-18 17:22 star521 阅读(18) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 20 下一页