编译语句时出错:
失败:ParseException第2行:16输入不匹配,预期为) 在创建表语句的“ STRING”附近。
CREATE TABLE daily_volume (
amble STRING NOT NULL,
code STRING NOT NULL,
prod_code STRING NOT NULL,
legal entity STRING NOT NULL,
country STRING NOT NULL,
buile STRING NOT NULL,
cost_center STRING NOT NULL,
glack account STRING NOT NULL,
inter STRING NOT NULL,
billing number STRING NOT NULL,
account number STRING NOT NULL,
transaction TIMESTAMP NOT NULL,
volume INTEGER NOT NULL)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '~'
STORED AS TEXTFILE;
LOCATION '/user/hive/warehouse/Eav/data/dev_ans_mns.db';
答案 0 :(得分:0)
我认为STRING在mysql中不是有效的列类型,通常也需要字符串的长度
CHAR(30)
VARCHAR(30)
答案 1 :(得分:0)
您的脚本中有两个问题:
另外,请注意,“ dev_raw_mns.db”将是hdfs上的文件夹!
答案 2 :(得分:0)
从;
删除STORED AS TEXTFILE;
只需尝试STORED AS TEXTFILE