Hive 代码错误:创建外部表时常见问题解析
There are a few issues with the provided Hive code:
-
The 'ROW FORMAT DELITMITED' should be 'ROW FORMAT DELIMITED' to specify the delimiter used in the table.
-
The 'FIELDS TERMIATED BY '\t'' should be 'FIELDS TERMINATED BY '\t'' to specify the field delimiter as a tab character.
-
The 'STORED AS TEXTFILE' should be 'STORED AS TEXTFILE;' to properly terminate the statement.
Here is the corrected Hive code:
CREATE EXTERNAL TABLE dblab.bigdata_user(
id INT,
uid STRING,
item_id STRING,
behavior_type INT,
item_category STRING,
visit_date DATE,
province STRING
)
COMMENT 'Welcome to xmu dblab!'
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
STORED AS TEXTFILE
LOCATION '/bigdatacase/dataset';
原文地址: https://www.cveoy.top/t/topic/paaM 著作权归作者所有。请勿转载和采集!