hive数据库往表中插入数据报错:FAILED: UDFArgumentException void not found.

今天写sql的时候遇到一个问题,记录一下。

我需要往一张临时表里面插入数据,具体代码如下所示:

insert into table hi_app_dc.dapd_cust_filecompl_sheet_new_temp1
select 
b.jtsc_new_latn_id
,a.tele_area_id                        
,a.busi_nbr                            
,a.prod_inst_id                        
,a.prod_type                           
,a.accept_date                         
,a.accept_chnl                         
,a.sheet_id                            
,a.fault_filecompl_ctnt                
,a.is_fcst_prcs_success                
,a.sheet_state                         
,a.deal_mthd                           
,a.fault_filecompl_apr_small_clst_code 
,nvl(a.fault_filecompl_rsn_small_clst_code_temp1,fault_filecompl_rsn_small_clst_code_temp2)
,a.fault_filecompl_deal_dur            
,a.fault_filecompl_deal_ctnt           
,a.handle_end_time                     
,a.lab_remarks
,a.sheet_type                          
,a.address                             
,a.longitude                           
,a.latitude                            
,a.enodebid_cell_id                    
from 
hi_app_dc.dapd_cust_filecompl_sheet_new_temp11 a
left join 
hi_dim_dc.dim_latn b on a.latn_id=b.region_id;

插入之前我单独执行了一次select语句,编译无异常能正常查询数据。但是但是,加上insert into再查询的时候就出问题了:

Error: Error while compiling statement: FAILED: UDFArgumentException void not found. (state=42000,code=40000)

之前没遇到过这种错误,在网上也没找到相关的异常记录资料,于是根据提示去看了一下我取数表的字段,发现我的取数主表里面有一个字段类型是 void 型的,直觉告诉我问题多半是出在这里了。

desc hi_app_dc.dapd_cust_filecompl_sheet_new_temp11 ;
+--------------------------------------------+------------+----------+--+
|                  col_name                  | data_type  | comment  |
+--------------------------------------------+------------+----------+--+
| latn_id                                    | string     |          |
| tele_area_id                               | string     |          |
| busi_nbr                                   | string     |          |
| prod_inst_id                               | string     |          |
| prod_type                                  | string     |          |
| accept_date                                | string     |          |
| accept_chnl                                | string     |          |
| sheet_id                                   | string     |          |
| fault_filecompl_ctnt                       | string     |          |
| is_fcst_prcs_success                       | int        |          |
| sheet_state                                | string     |          |
| deal_mthd                                  | string     |          |
| fault_filecompl_apr_small_clst_code        | string     |          |
| fault_filecompl_rsn_small_clst_code_temp1  | string     |          |
| fault_filecompl_rsn_small_clst_code_temp2  | string     |          |
| fault_filecompl_deal_dur                   | bigint     |          |
| fault_filecompl_deal_ctnt                  | string     |          |
| handle_end_time                            | string     |          |
| lab_remarks                                | void       |          |---void类型,感觉有异常
| sheet_type                                 | string     |          |
| address                                    | string     |          |
| longitude                                  | double     |          |
| latitude                                   | double     |          |
| enodebid_cell_id                           | void       |          |
+--------------------------------------------+------------+----------+--+

最后更新了一下我的取数临时表,把 lab_remarks 的字段类型改成了 string ,然后再执行插入语句, 编译通过,执行成功!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值