create table if not exists hive.data(ip string,time string,day string,traffic bigint,type string,id string);
在hive中建表時會出現這樣的問題,糾結了很久,網上查詢說time字段為hive保留字段,修改之后即可。如果非要用這個字段名,就用反引號改起來:
反引號就是鍵盤左上方1的左邊那個,中文的符號`
如create table if not exists hive.data(ip string,`time` string,day string,traffic bigint,type string,id string);
引用https://blog.csdn.net/u011940366/article/details/51396152