• 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'
  • 相关阅读:
    简单工厂模式
    单例模式
    Quartz.NET总结(三)Quartz 配置
    Quartz.NET总结(二)CronTrigger和Cron表达式
    ORACLE跨数据库查询的方法
    github使用个人总结
    ffmpeg 下载安装和简单应用
    Python 安装与环境变量配置
    Sublime text 3 汉化教程
    给大家分享两套WordPress收费主题
  • 原文地址:https://www.cnblogs.com/dcx-1993/p/11793975.html
Copyright © 2020-2023  润新知