我有一个CSV文件这样的:HIVE - quoteChar SERDE不起作用
“” 9998 “”, “” 714144 “”, “” frwiki-20131107-页面-元历史2。 xml“”;“”Ripchip Bot“” “”10000“”;“”195090“”;“”frwiki-20131107-pages-meta-history2.xml“”“;”“TXiKiBoT”“ ”“10002” “;” “265154” “” “frwiki-20131107-页面-元history2.xml” “” “Jimmy44””
我尝试创建一个外部表吧:
CREATE EXTERNAL TABLE titi(username string,id int, revisionid int, fileName string) row format serde 'com.bizo.hive.serde.csv.CSVSerde'
with serdeproperties("separatorChar" = "\;"
, "quoteChar" = "\"\"")
stored as textfile
LOCATION '/contributor';
但作为一个结果,我已经:
hive> select * from titi limit 10;
OK
��"9998"" ""714144"" ""frwiki-20131107-pages-meta-history2.xml"" ""Ripchip Bot""
NULL NULL NULL
"10000"" ""195090"" ""frwiki-20131107-pages-meta-history2.xml"" ""TXiKiBoT""
NULL NULL NULL
"10002"" ""265154"" ""frwiki-20131107-pages-meta-history2.xml"" ""Jimmy44""
NULL NULL NULL
"10004"" """" ""frwiki-20131107-pages-meta-history2.xml"" """"
NULL NULL NULL
"10006"" ""1046395"" ""frwiki-20131107-pages-meta-history2.xml"" ""LoveBot""
NULL NULL NULL
我错了我的表的创建语法?
你想让输出看起来像什么? – gobrewers14
与结果相同,但没有引用。 –