失败:ParseException 第 5:16 行无法识别“TIME”附近的输入',' “商店名称”在列类型中
尝试在配置单元数据库中创建表时出现错误。我通过 docker 镜像访问它。
我正在使用的命令:
root@:/opt/Hadoop#hive -f test_db.sql
下面提到的是 .sql
文件的内容:
create database test_db;
use test_db;
CREATE EXTERNAL TABLE purchases (
purchase_date DATE,
Purchase_time TIME,
store_name STRING,
item_name STRING,
item_cost FLOAT,
payment STRING
) ROW FORMAT DELIMITED
FIELDS TERMINATED BY '#'
STORED AS TEXTFILE
LOCATION '/user/input/purchases';
错误是:
FAILED: ParseException line 5:16 cannot recognize input near 'TIME' ','
'store_name' in column type
知道这有什么问题吗?
谢谢!
I am getting error when trying to create a table in hive database. I am accessing it through docker image.
The command I am using:
root@:/opt/Hadoop#hive -f test_db.sql
Below mentioned is the content for the .sql
file:
create database test_db;
use test_db;
CREATE EXTERNAL TABLE purchases (
purchase_date DATE,
Purchase_time TIME,
store_name STRING,
item_name STRING,
item_cost FLOAT,
payment STRING
) ROW FORMAT DELIMITED
FIELDS TERMINATED BY '#'
STORED AS TEXTFILE
LOCATION '/user/input/purchases';
The error is:
FAILED: ParseException line 5:16 cannot recognize input near 'TIME' ','
'store_name' in column type
Any idea what's wrong in this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我将“TIME”数据类型更改为“TIMESTAMP”并尝试构建表时,我可以在 HIVE 内构建表。
When I changed the 'TIME' datatype into 'TIMESTAMP' and tried building the table, I could build the table inside HIVE.