jan 18 "value1 is null" feb 4 "value1 is null"
在上面的数据集中,第二行的第1列和第2列之间有连续分隔符。如何将连续分隔符作为一个分隔符处理。
polkgigr1#
create external table mydata ( c1 string ,c2 string ,c3 string ) row format serde 'org.apache.hadoop.hive.serde2.RegexSerDe' with serdeproperties ('input.regex' = '(".*?"|.*?)\\s+(".*?"|.*?)\\s+(".*?"|.*?)') location '/user/hive/warehouse/mydata' ;
select * from mydata;
+-----------+-----------+------------------+ | mydata.c1 | mydata.c2 | mydata.c3 | +-----------+-----------+------------------+ | jan | 18 | "value1 is null" | | feb | 4 | "value1 is null" | +-----------+-----------+------------------+
1条答案
按热度按时间polkgigr1#