FAILED: ParseException line 9:22 mismatched input '<EOF>' expecting StringLiteral near 'BY' in table row format's field separator
时间: 2023-12-24 11:05:00 浏览: 49
FAILED: ParseException line 2:0 character ‘ ‘ not supported here line 2:1 character ‘ ‘ not supporte
这个错误通常是因为在 `FIELDS TERMINATED BY` 后面缺少了一个字符串字面量。请检查你的代码,确保你在 `FIELDS TERMINATED BY` 后面提供了正确的字符串字面量来指定字段分隔符。
以下是一个修正后的代码示例:
```
CREATE EXTERNAL TABLE IF NOT EXISTS news (
keyword INT,
html INT,
name STRING,
text STRING,
price STRING
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ';'
LOCATION '/path/to/external/table'
STORED AS TEXTFILE;
```
请注意,`FIELDS TERMINATED BY` 后面的字符串字面量是 `';'`,这表示字段分隔符是分号。如果你仍然遇到问题,请告诉我,我会尽力帮助你解决。
阅读全文