如何忽略csv配置单元表中的单双引号,如hello“world

hs1ihplo  于 2021-06-01  发布在  Hadoop
关注(0)|答案(0)|浏览(496)

我在用serde类和 escapeChar='\"' 但该值存储为null,而不是hello world/

>> cat file.csv 1, Hello"World

>> table ddl

create table test (id int, name string) ROW FORMAT SERDE              
| |   'org.apache.hadoop.hive.serde2.OpenCSVSerde'     | | WITH
SERDEPROPERTIES (                             | |  
'separatorChar'=','
    'escapeChar'='\"'
    'quoteChar'='\"')                             | | STORED AS INPUTFORMAT                              | |  
'org.apache.hadoop.mapred.TextInputFormat'       | | OUTPUTFORMAT     
| |   'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' |

>> Output:
Hive: Select * from test; 
ok 
1, NULL

????

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题