1

我正在尝试使用以下查询在配置单元中创建一个表:

create table customers(Cust_ID INT, Cust_Name STRING, Dealer_ID INT, Country STRING, State STRING, City STRING, ZipCode INT)
    row format delimited
    fields terminated by ';'
    stored as textfile;

但我收到以下错误:

FAILED: Parse Error: line 0:-1 mismatched input '<EOF>' expecting StringLiteral in table row format's field separator

我以前用相同的语法创建了事务表,结果很好。但不知何故,我认为我犯了一些语法错误。请帮忙。

4

2 回答 2

0

尝试转义';' 通过添加 '\' os,您的查询将如下所示:

create table customers(Cust_ID INT, Cust_Name STRING, Dealer_ID INT, Country STRING, State STRING, City STRING, ZipCode INT)
    row format delimited
    fields terminated by '\;'
    stored as textfile;
于 2015-12-29T11:31:15.897 回答
0

尝试使用 OCT \073 而不是 ';' 例子:

row format delimited fields terminated by '\073'
于 2017-06-13T16:46:27.227 回答