0
votes

Below part of my Hive create table query is failing:

ROW FORMAT DELIMITED                                                               
   NULL DEFINED AS ''
WITH SERDEPROPERTIES (                                                             
   'escapeChar'='\\',                                                               
   'quoteChar'='\'',                                                                
   'separatorChar'='^')

and getting error as "Error: Error while compiling statement:

FAILED: ParseException line 59:0 missing EOF at 'WITH' near '''' (state=42000,code=40000)"

Can anyone help me out.

Thanks for Advance

1

1 Answers

1
votes

Try with 'serialization.null.format' in TBLPROPERTIES instead of specifying NULL DEFINED AS '', then hive will treat empty spaces as NULL.

Example:

ROW FORMAT DELIMITED
TBLPROPERTIES (                                                             
   'escapeChar'='\\',                                                               
   'quoteChar'='\'',                                                                
   'separatorChar'='^',
   'serialization.null.format'='');