- 博客(28)
- 收藏
- 关注
原创 2020-08-24
用户基础属性信息正则表达式匹配电话号码识别,正则表达式((((010)|(0[2-9]\d{1,2}))[-\s]?)[1-9]\d{6,7}KaTeX parse error: Undefined control sequence: \+ at position 5: )|((\̲+̲?0?86\-?)?1[3|4…)银行卡号识别,正则表达式(([13-79]\d{3})|(2[1-9]\d{2})|(20[3-9]\d)|(8[01-79]\d{2}))\s?\d{4}\s?\d{4}\s?\d{4
2020-08-24 09:22:13
240
原创 tableau添加时间范围筛选、时间级别选择
时间范围参见 :https://kb.tableau.com/articles/HowTo/creating-a-filter-for-start-and-end-dates-parameters?lang=zh&_ga=2.89184731.1511110661.1584003228-1254132777.1583487940时间级别(日月年)参见 :https://kb...
2020-03-12 17:00:19
4674
原创 hadoop查询表大小 hadoop fs -du
hadoop fs -du -h -s /user/hive/warehouse/riskn.db/user_type_app-s:表示汇总值(其实就是查询这个表数据总的文件大小,反之查的是表每个文件的大小)-h:单位为k,m,g,便于阅读举个例子,一目了然:...
2020-01-02 19:27:24
4476
原创 crontab配置任务执行脚本传入时间参数date
crontab中,执行脚本需要传入系统时间$(date +"%Y-%m-%d"),配置后一直无法执行30 14 * * * /home/rong/www/scripts/running_bi.sh test $(date +"%Y-%m-%d" -d "-31day") 5 >> ../log/bi_daily/test_`date +"\%Y\%m\%d"`.log 2>...
2019-10-22 14:40:48
6080
原创 ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
ERROR : Failed with exception Exception when loading 1 in table dwd_loan_repay_plan_001 with loadPath=hdfs://nameservice1/tmp/hive-staging/.staging_hive_2019-09-26_16-12-25_276_6266528423926362203-107...
2019-09-26 16:53:59
4823
原创 FAILED: ParseException line 1:0 character '' not supported here问题解决
azkaban跑批遇到一个奇葩的问题,报错:FAILED: ParseException line 1:0 character ' ' not supported heresql在hue中可以执行,但用shell命令无法执行,排查好久,发现是sql脚本文件编码格式问题,文件为bom格式,需要将文件另存为非bom格式,执行不报错...
2019-09-25 22:00:19
1407
原创 python中用presto连接hive
安装包pip install presto-python-clientpython测试文件import prestodbconn=prestodb.dbapi.connect( host='localhost', port=8443, user='username', catalog='hive', schema='default', ...
2019-09-25 15:01:51
3018
原创 sublime text之显示当前文件的编码
Sublime Text的默认设置是不开启显示编码的如需开启:Perference → Settings – User,在打开的配置文件里 ,在大括号后面,增加以下内容:// Display file encoding in the status bar"show_encoding": true,// Display line endings in the status bar"s...
2019-09-25 11:00:35
493
原创 windos安装grep
zip下载:http://www.interlog.com/~tcharron/grep.html解压缩,配置环境变量即可使用
2019-09-05 10:54:06
910
转载 linux机器配置查询
cpu:https://www.cnblogs.com/xudong-bupt/p/8278435.html内存:https://www.cnblogs.com/xudong-bupt/p/8278435.html
2019-09-05 10:53:43
207
原创 查看hive表文件大小
hadoop fs -du /user/hive/warehouse/risk_tmp.db/tablename|awk ' { SUM += $1 } END { print SUM/(1024*1024*1024) }'
2019-09-05 10:53:01
2406
原创 hive删除分区数据
alter table tablename drop partition(etl_dt>='2018-01-01');
2019-09-05 10:52:07
1571
1
转载 git安装密钥
配置连接:https://blog.youkuaiyun.com/sinat_15955423/article/details/81707185
2019-04-09 23:52:25
209
原创 python 安装impala包
直接pip install impala 是不行滴,按照以下步骤安装就会成功!一路安装就可以1、pip install six2、pip install bit_array3、pip install thriftpy4、pip install thrift_sasl5、pip install impyla测试:>>> from impala....
2019-03-14 22:31:06
3790
5
原创 pandas 的pivot_table对数据进行排序 sort_index
## 参数sort_index(axis=0, level=None, ascending=True, inplace=False, kind='quicksort', na_position='last', sort_remaining=True, by=None)## 参数说明axis:0按照行名排序;1按照列名排序level:默认None,否则按照给定的level顺序排列---貌似...
2019-03-12 23:42:41
17574
1
原创 优快云排名前十榜单(2019/03)
https://me.youkuaiyun.com/stpeace https://me.youkuaiyun.com/yuanmeng001 https://blog.youkuaiyun.com/phphot https://blog.youkuaiyun.com/augusdi https://blog.youkuaiyun.com/tianlesoftware https://blog.youkuaiyun.com/dyllove98 htt...
2019-03-12 23:17:21
491
原创 python list 倒叙遍历
lista = [1,2,3,4]for i in reversed(lista): print(i)输出:4321将list集合倒叙遍历。
2019-03-12 23:02:25
3444
原创 phabricator 配置及使用
1.打开此链接http://codereview.rong.com/ 进行注册(公司cr地址)2.git clone https://github.com/phacility/arcanist.gitgit clone https://github.com/phacility/libphutil.git(不要从windos拷贝到linux,直接在本地克隆)3.vi ~/.bash...
2019-03-11 23:34:35
773
原创 git命令操作
密钥配置:https://blog.youkuaiyun.com/sinat_15955423/article/details/81707185# 常用命令git pullgit statusgit diffgit add .git commit -m "注释"git push# 将本地分支与远程分支做关联git push -u origin dev# 刷新当前远程分支,可以看到最...
2019-03-11 23:13:55
140
原创 hive sql性能调优参数设置
set hive.map.aggr=true;set hive.optimize.skewjoin=true;set hive.groupby.skewindata=true;set hive.optimize.skewjoin=true;set hive.map.aggr=true;set mapred.child.java.opts=-Xmx8000m;set mapreduce...
2019-03-11 23:09:31
1797
原创 夜深瞎扯淡
今天开了个组会,感觉组长已经很牛了,但天天晚上早起还坚持看书,关注技术,学习新的东西,想起来一句话,越优秀的人越努力,自己也要加油了!!!...
2019-03-07 00:18:12
158
原创 hive sql 根据出生日期计算年龄(闰年同样准确)
需求:根据用户出生日期,用hive sql计算用户年龄由于闰年原因,直接用datediff计算当前与出生日期天数去除以365会造成年龄不准确,所以对数据进行处理来计算准确的年龄select if(datediff(CURRENT_DATE,CONCAT(substr(CURRENT_DATE,0,4),substr('2015-03-04',5,7)))>=0, (subs...
2019-03-06 23:21:10
15658
1
原创 linux shell脚本 删除指定目录下文件夹(可指定文件夹名、时间)
情景:需要删除以201812开头的、6天前修改的文件夹(文件夹里包含文件)。鼓捣了好一会,开始用find /home/users/niu/test/log/ -name '201812*' -type d -mtime +5 -exec rm -f {} \; 会报错:no such file or directory,后来改用以下脚本,不报错。#!/bin/bash...
2018-12-17 23:00:55
8506
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人