- 博客(5)
- 收藏
- 关注
原创 HIve replace
replaceselect replace(a.f_value, ‘%20’, ’ ') f_value, a.vidfrom (select replace(lower(v.f_value), ‘%7c’, ‘|’) f_value, v.vidfrom mds_log_weblog_pageview vwhere v.dt >= ‘2020-06-09’and v.dt < ‘2020-06-10’and v.site in (‘www’, ‘wap’, ‘app’)) a.
2020-06-16 09:39:53
1944
原创 Hive --数据上传
HIve 数据上传create external table temp.lyr_itemcode(itemcode string )ROW FORMAT DELIMITED FIELDS TERMINATED BY ‘\009’ LINES TERMINATED BY ‘\n’LOCATION ‘/user/liuyaru/itemcode’
2020-06-11 11:47:47
247
原创 HIve时间函数
HIve 时间函数hive时间日期函数及典型场景应用1、hive取得当前日期时间:1.1) 取得当前日期:select current_date();1.2) 取得当前日期时间:select current_timestamp();1.3) hive取得当前时间戳:select unix_timestamp();1.4) 时间戳转日期:select from_unixtime(1517725479,‘yyyy-MM-dd HH:dd:ss’);1.5) 日期转unix时间戳:sele
2020-06-11 11:46:05
15040
1
原创 Oracle分割
Oracle 分割方法1select T.DHPAY_ID,T.ORDERNO,trim(REGEXP_SUBSTR(ORDERNO, ‘[^,]+’, 1, level)) ORDERNOfrom (select d.DHPAY_ID, d.ORDERNOfrom FUND_PAYMENT_DHPAY dwhere d.response_code = ‘01’and d.insertdate >= to_date(‘2019-06-01’, ‘yyyy-mm-dd’)) Tconn
2020-06-11 11:39:56
1895
原创 Oracle数据库相关知识
Oracle写循环declareVD_S date := to_date(‘20200214’, ‘yyyymmdd’);VD_E date := to_date(‘20200221’, ‘yyyymmdd’);VD_CURRENT date;beginVD_CURRENT := VD_S;while VD_CURRENT < VD_E loopinsert into tmp_lyr_balance_a_7dselect distinct VD_CURRENT
2020-06-11 11:37:32
141
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人