hive存储过程遇到的问题及解决办法

1.报错信息cannot recognize input near 'left' 'join' '(' in join type specifier
解决办法:将脚本中的left join 替换成 left outer join

2.报错信息No partition predicate found for Alias "t" Table "biz_service_log_t"

解决办法:biz_service_log_t是分区表,在查询这张表没有指定分区,导致查询无法进行,加上相应的分区再查询或者执行set hive.mapred.mode=nonstrict;
报错信息Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
解决办法:null 改为''

3.报错信息:Argument type mismatch '0': The expression after ELSE should have the same type as those after THEN: "bigint" is expected but "int" is found
解决办法:利用转换函数cast (0 as bigint)

4.报错信息:Invalid column reference 'CUST_TP_ID'
解决办法:CUST_TP_ID列没有指定具体的别名

猜你喜欢

转载自my.oschina.net/u/1866459/blog/1530013
今日推荐