如何在Hive 3上的Hadoop 3.x.y上读取csv.zstd文件?

huangapple go评论53阅读模式
英文:

how can I read csv.zstd files on hive 3 on hadoop 3.x.y?

问题

我有 .csv.zstd 文件

它是这样的:

col1|col2
1,2

所以我在 Hive 上创建了一个表:

create external table test_zstd (
col1 bigint,
col2 bigint
) row format delimited fields terminated by ''|'' 
stored as textfile
location ''hdfs://test/test_zstd''
tblproperties(
''skip.header.line.count''=''1'')

但是当我选择该表时,它返回 10 行(我只有 1 行数据),所有列都为空,只有第一列不为空,其中包含不同的字符,如 ?*?...

英文:

I have files .csv.zstd

it is like this :

col1|col2
1,2

so i create table on hive :

create external table test_zstd (
col1 bigint,
col2 bigint
) row format delimited fields terminated by '|' 
stored as textfile
location 'hdfs://test/test_zstd'
tblproperties(
'skip.header.line.count'='1')

But when i select that table it brings 10 rows ( i have just 1 data line in my file) and all columns are null but just first columns is not empty which is different chars like ?*?...

答案1

得分: 0

当我将文件名从**.csv.zstd更改为.csv.zst**时,它可以工作。

它无法与zstd扩展名一起工作。

英文:

When i change the file name to .csv.zstd to .csv.zst it works.

It is not able to work with zstd extensions

huangapple
  • 本文由 发表于 2023年5月28日 19:13:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76351191.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定