You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Bo Shi <bs...@gmail.com> on 2011/06/28 05:43:15 UTC
mapred: avro data file input to text-based csv output
Hey all,
I've seen an example of taking a plain text file as an input to an
AvroJob (using AvroUtf8InputFormat) but I haven't found anything about
taking an Avro data file as input and producing a text-based file
(CSV, say). Any hints here?
Thanks,
Bo
Re: mapred: avro data file input to text-based csv output
Posted by Joe Crobak <jo...@gmail.com>.
We use Pig and AvroStorage [1] to do this. It's a very small pig script,
something like:
register piggybank.jar
define AvroStorage o.a.p.pb.AvroStorage()
data = LOAD '$INFILE' using AvroStorage;
store data into '$OUTPUT' using PigStorage(',');
[1] https://issues.apache.org/jira/browse/PIG-1748
On Mon, Jun 27, 2011 at 11:43 PM, Bo Shi <bs...@gmail.com> wrote:
> Hey all,
>
> I've seen an example of taking a plain text file as an input to an
> AvroJob (using AvroUtf8InputFormat) but I haven't found anything about
> taking an Avro data file as input and producing a text-based file
> (CSV, say). Any hints here?
>
> Thanks,
> Bo
>