Re: Avro Schema to SQL

2013-06-25 Thread Mason

Might be worth looking at Sqoop's source.

On 6/19/13 02:31 AM, Avinash Dongre wrote:

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





ETL in face of column renames

2013-05-22 Thread Mason

dear list,

I have what I imagine is a standard setup: a web application generates 
data in MySQL, which I want to analyze in Hadoop; I run a nightly 
process to extract tables of interest, Avroize, and dump into HDFS.


This has worked great so far because the tools I'm using make it easy to 
load a directory tree of Avros with the same schema.


The issue is what to do when schema changes occur in the SQL database. I 
believe column additions and deletions are handled automatically by the 
Avro loaders I'm using, but I need to deal with a column rename.


My thinking is: I could bake the table schemas at time of ETL into the 
Avros, for historical record, but then manually copy that schema out as 
a master schema and apply it to all Avros for which it's appropriate; 
then when a column rename occurs, go back and edit the master schema.


I've never used an external schema before, so please correct if I 
misunderstand how they work.


Anyone have wisdom to share on this topic? I'd love to hear from anyone 
who has done this, or has a better solution.


-Mason