Hive Avro to Parquet table conversion
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Mô tả
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.*
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Đọc tài liệu migration được tham chiếu và tái tạo truy vấn Hive 0.13 CREATE TABLE parquet_table STORED AS parquet AS SELECT * FROM avro_table bằng cách sử dụng schema union lồng nhau. Sử dụng lỗi Unknown field type: uniontype đã được báo cáo làm điểm bắt đầu; công việc được xem là hoàn tất khi có một quy trình được tài liệu hóa hoặc được triển khai để chuyển đổi cấu trúc này sang Parquet.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Lĩnh vực
- databases
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100