【发布时间】:2021-09-21 08:28:17
【问题描述】:
我有一个 CSV 文件,我试图将它放在一个配置单元表中。 CSV 包含一些列的字典。
文件如下所示:
a,b,{'c':'d','e':'f'},g
所以表格应该是这样的:
| col1 | col2 | col3 | col4|
| -------- | -------------- | ---- | --- |
| a | c | {'c':'d','e':'f'} | g |
但它会拾取括号内的逗号。
如何忽略括号内的逗号。
我正在使用它来编写配置单元表。
create external table mytable(
col1 string,
col2 string,
col3 string,
col4 string
)
row format delimited fields terminated by ',' stored as textfile location '/user/myuser/mydir/';
【问题讨论】:
标签: csv hadoop hive hdfs hiveql