摘要: # ratefrom pyspark.sql import SparkSession spark = SparkSession.builder. \ appName("study_structured_streaming"). \ enableHiveSupport(). \ config("spa 阅读全文
posted @ 2021-06-23 20:11 muyue123 阅读(55) 评论(0) 推荐(0) 编辑
摘要: create table test.t_20210429 ( app String, cnt Nullable(UInt32), per Nullable(UInt32) ) ENGINE=MergeTree() order by app; insert into test.t_20210429 v 阅读全文
posted @ 2021-04-29 18:56 muyue123 阅读(62) 评论(0) 推荐(0) 编辑
摘要: # 分组取topn create table t_0428(id UInt32,nm String,cnt UInt32) ENGINE=MergeTree() order by id; insert into t_0428 values(1,'a',100),(1,'b',101),(1,'c', 阅读全文
posted @ 2021-04-28 14:46 muyue123 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 当要匹配特殊的隐藏字符\n \r \t ,等回车符、制表符时,需要通过使用四个 \ 进行转译。 regexp_replace(title, '\\\\n|\\\\\t|\\\\\r', ',') title 使用char(*)也可以进行处理 spark.sql("select regexp_repl 阅读全文
posted @ 2021-04-25 16:38 muyue123 阅读(1548) 评论(0) 推荐(0) 编辑
摘要: awscli 里不能直接使用“*” aws s3 rm s3://s3://log-provision/08_nhk/mesh/temp/*/*/ver3/*1这样是不行的,需要使用--recursive和--exclude、--include.在--exclude、--include里使用“*”。 阅读全文
posted @ 2021-03-01 16:54 muyue123 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 李林 1-11 19:58:17避免mysql大小写不敏感的建表方式:李林 1-11 19:58:18create table test.tmp_app_category_20210111(app_id varchar(500),title varchar(500),category varchar 阅读全文
posted @ 2021-02-24 13:52 muyue123 阅读(308) 评论(0) 推荐(0) 编辑
摘要: Hive 中 A 表存在数据, 但执行 select count(*) from A 返回结果为 0 原因 参数 hive.compute.query.using.stats 默认为 false, 在参数优化时修改为 true 导致上述问题产生 解决 使用 select count(*) / cou 阅读全文
posted @ 2021-02-04 11:47 muyue123 阅读(1501) 评论(0) 推荐(0) 编辑
摘要: yarn logs -applicationId application_1493700892407_0007 阅读全文
posted @ 2021-02-01 15:58 muyue123 阅读(551) 评论(0) 推荐(0) 编辑
摘要: SELECT modulo(10, 3) #求余数 SELECT modulo(10, 3) 阅读全文
posted @ 2021-01-14 18:05 muyue123 阅读(38) 评论(0) 推荐(0) 编辑
摘要: df = spark.createDataFrame([('LC7-H6116BCF-R-GL-201116V750Fans', '张三', 88), ('语文', '张三', 92), ('英语', '张三', 77), ('数学', '王五', 65), ('语文', '王五', 87), (' 阅读全文
posted @ 2021-01-06 20:00 muyue123 阅读(209) 评论(0) 推荐(0) 编辑