Hive Avro to Parquet table conversion
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.6k
- Merge moyen
- 3 j 12 h
- PR mergées (30 j)
- 33
Description
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.*
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Lisez la documentation de migration référencée et reproduisez la requête Hive 0.13 CREATE TABLE parquet_table STORED AS parquet AS SELECT * FROM avro_table en utilisant le schéma d’union imbriqué. Prenez l’erreur signalée Unknown field type: uniontype comme point de départ ; le travail sera considéré comme terminé lorsqu’il existera un chemin documenté ou implémenté pour convertir cette structure en Parquet.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Domaine
- databases
- Type d'issue
- Bug
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 20/100