Hive Avro to Parquet table conversion
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.6k
- 平均合并
- 3 天 12 小时
- 30 天内合并 PR
- 33
描述
Hi.
I have following avro schema
```Java
{
"namespace" : "com.example.test",
"type" : "record",
"name" : "TestRecord",
"fields" : [{"name" : "objectLink", "type" : [
{"type": "record", "name" : "TestObj1", "fields" : [{"name":"obj1VisitorId","type":["null","string"]}] },
{"type": "record", "name" : "TestObj2", "fields" : [{"name":"obj2VisitorId","type":["null","string"]}]}
]
}],
"doc" : "event for test purposes"
}
```
Using this schema I can create avro objects, also I'm able to create table backed by avro in Hive. But then I want to create a table backed by parquet I'm doing
CREATE TABLE parquet_table
STORED AS parquet
AS SELECT \* FROM avro_table
and i get
SemanticException java.lang.UnsupportedOperationException: Unknown field type: uniontype,struct>
Is there a way to convert such structures, to store them in hive backed as parquet? This is a simple example, but I have big data structure described in avro, so I can't convert it manually, and also I have data which already stored in avro and need to be loaded in table, backed by parquet. Is there any way to this?
I'm using hive 0.13.
**Reporter**: [Dmitriy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dimaga) / @dimaga
**Note**: *This issue was originally created as [PARQUET-155](https://issues.apache.org/jira/browse/PARQUET-155). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
贡献指南
这个仓库没有索引到贡献指南
调研方向
阅读所引用的迁移文档,并使用嵌套 union schema 重现 Hive 0.13 CREATE TABLE parquet_table STORED AS parquet AS SELECT * FROM avro_table 查询。以报告的 Unknown field type: uniontype 错误为起点;完成标准是提供一条用于将此结构转换为 Parquet 的已记录或已实现路径。
由索引模型根据 Issue 内容生成。
评估
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 20/100