使用 SERDEPROPERTIES 抛出错误的 Hive 创建 table
Hive create table with SERDEPROPERTIES throwing error
我的 Hive 下面的部分创建 table 查询失败:
ROW FORMAT DELIMITED
NULL DEFINED AS ''
WITH SERDEPROPERTIES (
'escapeChar'='\',
'quoteChar'='\'',
'separatorChar'='^')
并收到错误“错误:编译语句时出错:
FAILED: ParseException line 59:0 missing EOF at 'WITH' near ''''
(state=42000,code=40000)"
谁能帮帮我。
感谢提前
尝试在 TBLPROPERTIES 中使用 'serialization.null.format'
而不是指定 NULL DEFINED AS ''
,然后 hive 会将 empty spaces
视为 NULL
。
Example:
ROW FORMAT DELIMITED
TBLPROPERTIES (
'escapeChar'='\',
'quoteChar'='\'',
'separatorChar'='^',
'serialization.null.format'='');
我的 Hive 下面的部分创建 table 查询失败:
ROW FORMAT DELIMITED
NULL DEFINED AS ''
WITH SERDEPROPERTIES (
'escapeChar'='\',
'quoteChar'='\'',
'separatorChar'='^')
并收到错误“错误:编译语句时出错:
FAILED: ParseException line 59:0 missing EOF at 'WITH' near '''' (state=42000,code=40000)"
谁能帮帮我。
感谢提前
尝试在 TBLPROPERTIES 中使用 'serialization.null.format'
而不是指定 NULL DEFINED AS ''
,然后 hive 会将 empty spaces
视为 NULL
。
Example:
ROW FORMAT DELIMITED
TBLPROPERTIES (
'escapeChar'='\',
'quoteChar'='\'',
'separatorChar'='^',
'serialization.null.format'='');