Grokbase Groups Avro user June 2013
FAQ
Not all Avro schemas can be converted to SQL. Primarily, Unions can pose
challenges, as well as recursive references.

Nested types are a mixed bag ‹ some SQL-related systems have rich support
for nested types and/or JSON (e.g. PosgtgreSQL) which can make this easier,
while others are more crude (MySQL, HIVE).

With Unions, in some cases a union field can be expanded/flattened into
multiple fields, of which only one is not null. Recursive types can be
transformed into key references.

In general, all of these transformation strategies require decisions by the
user and potentially custom work depending on what database is involved.

Traversing an Avro Schema in Java is done via the Schema API, the Javadoc
explains it and there are many examples in the avro source code. The type
of schema must be checked, and for each nested type a different decent into
its contained types can occur.

From: Avinash Dongre <dongre.avinash@gmail.com>
Reply-To: "user@avro.apache.org" <user@avro.apache.org>
Date: Wednesday, June 19, 2013 2:31 AM
To: "user@avro.apache.org" <user@avro.apache.org>
Subject: Avro Schema to SQL

Is there know tool/framework available to convert Avro Schema into SQL.
If now , How Do i iterate over the schema to find out what records, enums
are there. I can think of how to achieve this with simple Schema, but I am
not able to figure out a way for nested schemas.



Thanks
Avinash

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupuser @
categoriesavro
postedJun 19, '13 at 9:31a
activeJun 28, '13 at 4:25p
posts3
users3
websiteavro.apache.org
irc#avro

People

Translate

site design / logo © 2021 Grokbase