当我尝试使用beeline / hive命令行为以下DDL创建表时:
CREATE EXTERNAL TABLE schema.table
(
`Week` string,
`Orders` string,
`Units` string
)
COMMENT 'This table was auto generated'
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES (
'separatorChar' = ',',
'quoteChar' = '\"',
'escapeChar' = '\\'
)
STORED AS TEXTFILE
LOCATION '/data/qa/ingest_id=1543338670'
TBLPROPERTIES ("skip.header.line.count"="1");
我收到以下错误
Error: Error while compiling statement: FAILED: ParseException line 3:0 character '▒' not supported here
line 3:1 character '▒' not supported here
line 3:2 character '▒' not supported here (state=42000,code=40000)
以前有人遇到过这个问题吗?该DDL在GUI客户端上执行没有问题。
答案 0 :(得分:0)
问题与UTF 8编码有关。从外壳中删除了unicode字符。
tr -d '\200-\277' | tr -d '\300-\377'