当前位置:   article > 正文

Hive向表中insert数据的问题_error encountered near token

error encountered near token

hive insert 动态分区异常(Error encountered near token)与解决

 

当insert数据到有分区的hive表里时若不明显指定分区会抛出异常

insert overwrite table persons_tmp select * from persons;
FAILED: SemanticException 1:23 Need to specify partition columns because the destination table is partitioned. Error encountered near token 'persons_tmp'

 

当指定分区后又会有非严格模式异常

insert overwrite table persons_tmp partition(dt,bs)  select * from persons;

 

FAILED: SemanticException [Error 10096]: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict

此时依据错误提示set好非严格模式即可

set hive.
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/474567
推荐阅读
相关标签
  

闽ICP备14008679号