
阿里云
lhxsir
Unto a full grown man.
展开
-
pyodps配置问题
使用pyodps运行SQL语句,在测试环境中能执行出结果,在生产环境反复执行就是没有结果,无奈求助dataworks大佬,这才发现是hive兼容模式的问题,导致日期解析出错!!!opds添加代码--打开MaxCompute 2.0数据类型set odps.sql.type.system.odps2=true; --打开Decimal 2.0数据类型set odps.sql.decimal.odps2=true; --Hive兼容模式set odps.sql.hive.compatible原创 2021-08-26 19:29:37 · 1425 阅读 · 1 评论 -
阿里云ODPS使用to_char()报错
执行SQL语句:select to_char(from_unixtime(cast(1622628854384/1000 as BIGINT)),'yyyymmdd');报错信息如下:FAILED: ODPS-0130071:[1,8] Semantic analysis exception - function to_char cannot match any overloaded functions with (STRING, STRING), candidates are STRING TO_原创 2021-07-29 15:36:17 · 2379 阅读 · 0 评论 -
阿里云odps SQL
odps官方网站使用示例:#使用TO_DATEselect *from xx_bi.dwd_bi_wide_order_pay_record_detail_di where ds='20210711'and payment_time between TO_DATE('2021-07-09 00:00:00','yyyy-mm-dd hh:mi:ss') and TO_DATE('2021-07-09 23:59:59','yyyy-mm-dd hh:mi:ss')#使用to_charsel原创 2021-07-13 11:22:44 · 686 阅读 · 0 评论 -
hologres常用语句
Holo行转列的实现#Holo行转列的实现SELECT regexp_split_to_table('a,s,d,f,g',',');原创 2021-07-05 09:26:22 · 1197 阅读 · 0 评论 -
PostgreSQL数据库使用
锁表解锁步骤:#查询是否有锁表select relation::regclass, * from pg_locks where not granted;#查询锁表的oidselect oid from pg_class where relname='可能锁表了的表'#查询锁表的pidselect pid from pg_locks where relation='上面查出的oid'#释放锁定的表select pg_cancel_backend(上面查到的pid)...原创 2021-07-01 16:19:27 · 197 阅读 · 0 评论