我正在尝试使用以下查询在hive中创建一个表:
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
我已经使用相同的语法创建了以前的事务表,并且它已经计算得很好..但不知怎的,我认为我做了一些语法错误。请帮助。
答案 0 :(得分:0)
尝试逃避';'通过添加'\',您的查询将如下所示:
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;
答案 1 :(得分:0)
尝试使用OCT \ 073而不是';' 例如:
row format delimited fields terminated by '\073'