in insert schema specification are not found among regular columns of nor dynamic partition columns

問題描述:hive插入數據時報錯,sql很簡單卻報錯了

insert into table1 (c1, c2, c3) 
select c1, c2, c3
from table2

分析:hive插入數據時不能指定列名插入,默認是全列插入!!!目前高版本支持指定列插入,而低版本不支持指定列插入。

insert into table1
select c1, c2, c3
from table2

注:

第一種寫法,在高版本hive和impala可以執行成功

第二種寫法,在低版本hive需要這樣寫

發佈了346 篇原創文章 · 獲贊 180 · 訪問量 79萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章