FAQ-维度建模修改表调用 Hive报错 types incompatible
更新时间: 2025-06-19 19:41:01
阅读 4
FAQ-维度建模修改表调用 Hive报错 types incompatible
问题描述/异常栈
The following columns have types incompatible with the existing columns in their respective positions
发现版本
问题原因
hive对不安全的类型转换有限制,如 string 转成 int 等,如果要忽略这种限制,需要
set hive.metastore.disallow.incompatible.col.type.changes=false
以下为官网完整清单
解决方案
1. 不安全的类型转换,重建表
2. 自助分析通过hive 新增 set hive.metastore.disallow.incompatible.col.type.changes=false 参数后执行字段类型转换sql
作者:李凌威
文档反馈
以上内容对您是否有帮助?