create table if not exists hive.data(ip string,time string,day string,traffic bigint,type string,id string);

Hive建表语句出现错误ParseException line 1:28 cannot recognize input near 'time' 'string' ',' in column name or constraint

 

在hive中建表时会出现这样的问题,纠结了很久,网上查询说time字段为hive保留字段,修改之后即可。如果非要用这个字段名,就用反引号改起来:

反引号就是键盘左上方1的左边那个,中文的符号` 

如create table if not exists hive.data(ip string,`time` string,day string,traffic bigint,type string,id string);

Hive建表语句出现错误ParseException line 1:28 cannot recognize input near 'time' 'string' ',' in column name or constraint

 

 

 

 

引用https://blog.csdn.net/u011940366/article/details/51396152

 

相关文章:

  • 2022-12-23
  • 2021-05-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案