,

Hive: mismatched input '<EOF>' expecting StringLiteral near 'BY' in table row format's field separator

понедельник, 7 октября 2013 г. Оставить комментарий

I got an error “FAILED: ParseException line 1:155 mismatched input '<EOF>' expecting StringLiteral near 'BY' in table row format's field separator” when created table in hive.


hive> CREATE TABLE IF NOT EXISTS D_PRODUCT_TYPE_HIVE (PROD_TYPE_ID DOUBLE, PROD_TYPE_NAME STRING, DESCRIPTION STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n';
FAILED: ParseException line 1:155 mismatched input '< EOF>' expecting StringLiteral near 'BY' in table row format's field separator
hive>

Semi-colon is reserved character. It needs to be escaped, '\;' or octal code '\073', but not hex code '\03B'.



hive> CREATE TABLE IF NOT EXISTS D_PRODUCT_TYPE_HIVE (PROD_TYPE_ID DOUBLE, PROD_TYPE_NAME STRING, DESCRIPTION STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\;' LINES TERMINATED BY '\n';
OK
Time taken: 0.308 seconds
hive>

3 коммент. »

  • animeworld пишет:  

    Thank you. It helped me. =)

  • Анонимно пишет:  

    thanks alot it helped

  • Анонимно пишет:  

    Thank you so much, dude!

  • Оставьте Ваш комментарий