Hive 报错SemanticException Error in parsing

Posted dcx-1993

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hive 报错SemanticException Error in parsing相关的知识,希望对你有一定的参考价值。

以下sql执行时报错SemanticException Error in parsing

select clr.id,clr.customer_id,clr,contract_code,clr.core_asset_request_id,wa.user_id
--,u.name
from zcfw_sda.sda03_asset_info clr
left join qz_sda.sda03_withdraw w
on clr.contract_code = w.contract_no
and w.etl_tx_dt = ${v_dt2num}
left join qz_sda.sda03_withdraw_apply wa
on w.withdraw_apply_no = wa.withdraw_apply_no
and wa.etl_tx_dt = ${v_dt2num}
--left join qz_sda.sda03_user u
--on wa.user_id = u.id
--and u.etl_tx_dt = ${v_dt2num}
where clr.etl_tx_dt =20191103
and to_date(clr.loan_time) =2019-11-03
and clr.contract_code=2191103751278446

报错信息:

技术图片

 

英文翻译过来是语义解析错误,

检查了下是在hql中别名后面的.不小心写成了,导致报错。

正确写法:

select clr.id,clr.customer_id,clr.contract_code,clr.core_asset_request_id,wa.user_id
--,u.name
from zcfw_sda.sda03_asset_info clr
left join qz_sda.sda03_withdraw w
on clr.contract_code = w.contract_no
and w.etl_tx_dt = ${v_dt2num}
left join qz_sda.sda03_withdraw_apply wa
on w.withdraw_apply_no = wa.withdraw_apply_no
and wa.etl_tx_dt = ${v_dt2num}
--left join qz_sda.sda03_user u
--on wa.user_id = u.id
--and u.etl_tx_dt = ${v_dt2num}
where clr.etl_tx_dt =20191103
and to_date(clr.loan_time) =2019-11-03
and clr.contract_code=2191103751278446

 

 

以上是关于Hive 报错SemanticException Error in parsing的主要内容,如果未能解决你的问题,请参考以下文章

hive 错误 FAILED: SemanticException [Error 10041]: No partition predicate found for

SemanticException [错误 10014] Hive UDF

Hive:FAILED: SemanticException [Error 10001]: Line 1:14 Table not found 'Field'

Hive 给出 SemanticException [错误 10014]:运行我的 UDF 时

Hive - 向表中添加新列时,我得到:SemanticException [Error 10002]: Invalid column reference

hive select 出现问题 SemanticException