hive存儲過程遇到的問題及解決辦法

1.報錯信息cannot recognize input near 'left' 'join' '(' in join type specifier
解決辦法:將腳本中的left join 替換成 left outer joinexpress

2.報錯信息No partition predicate found for Alias "t" Table "biz_service_log_t"apache

解決辦法: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)oop

4.報錯信息:Invalid column reference 'CUST_TP_ID'
解決辦法:CUST_TP_ID列沒有指定具體的別名code

相關文章
相關標籤/搜索