|
|
Ranjith 2012-10-31, 04:52
what is the best way to convert a text file into avro format? does the file need to contain a header? sorry if this is a basic question and has been answered several times.
Thanks, Ranjith
Miki Tebeka 2012-10-31, 12:28
You can use the "avro" tool that comes with the Python package (easy_install avro). It can convert both JSON (one per line) or CSV files to avro. On Tue, Oct 30, 2012 at 9:52 PM, Ranjith <[EMAIL PROTECTED]>wrote:
> what is the best way to convert a text file into avro format? does the > file need to contain a header? sorry if this is a basic question and has > been answered several times. > > Thanks, > Ranjith
Russell Jurney 2012-10-31, 15:52
An example of doing this is here: https://github.com/rjurney/Collecting-Data/blob/master/src/python/cat_avroRussell Jurney http://datasyndrome.comOn Oct 31, 2012, at 5:29 AM, Miki Tebeka <[EMAIL PROTECTED]> wrote: You can use the "avro" tool that comes with the Python package (easy_install avro). It can convert both JSON (one per line) or CSV files to avro. On Tue, Oct 30, 2012 at 9:52 PM, Ranjith <[EMAIL PROTECTED]>wrote: > what is the best way to convert a text file into avro format? does the > file need to contain a header? sorry if this is a basic question and has > been answered several times. > > Thanks, > Ranjith
ranjith raghunath 2012-10-31, 16:04
Thanks going to give that a shot. On Oct 31, 2012 7:29 AM, "Miki Tebeka" <[EMAIL PROTECTED]> wrote:
> You can use the "avro" tool that comes with the Python package > (easy_install avro). > It can convert both JSON (one per line) or CSV files to avro. > > > On Tue, Oct 30, 2012 at 9:52 PM, Ranjith <[EMAIL PROTECTED]>wrote: > >> what is the best way to convert a text file into avro format? does the >> file need to contain a header? sorry if this is a basic question and has >> been answered several times. >> >> Thanks, >> Ranjith > > >
Miki Tebeka 2012-11-01, 04:08
Actually, I meant something like: avro write --schema=/path/to/schema/file input.json > output.avro On Wed, Oct 31, 2012 at 9:04 AM, ranjith raghunath < [EMAIL PROTECTED]> wrote:
> Thanks going to give that a shot. > On Oct 31, 2012 7:29 AM, "Miki Tebeka" <[EMAIL PROTECTED]> wrote: > >> You can use the "avro" tool that comes with the Python package >> (easy_install avro). >> It can convert both JSON (one per line) or CSV files to avro. >> >> >> On Tue, Oct 30, 2012 at 9:52 PM, Ranjith <[EMAIL PROTECTED]>wrote: >> >>> what is the best way to convert a text file into avro format? does the >>> file need to contain a header? sorry if this is a basic question and has >>> been answered several times. >>> >>> Thanks, >>> Ranjith >> >> >>
Miki Tebeka 2012-11-01, 04:10
Note that input.json is one JSON record per line. On Wed, Oct 31, 2012 at 9:08 PM, Miki Tebeka <[EMAIL PROTECTED]> wrote:
> Actually, I meant something like: > avro write --schema=/path/to/schema/file input.json > output.avro > > > On Wed, Oct 31, 2012 at 9:04 AM, ranjith raghunath < > [EMAIL PROTECTED]> wrote: > >> Thanks going to give that a shot. >> On Oct 31, 2012 7:29 AM, "Miki Tebeka" <[EMAIL PROTECTED]> wrote: >> >>> You can use the "avro" tool that comes with the Python package >>> (easy_install avro). >>> It can convert both JSON (one per line) or CSV files to avro. >>> >>> >>> On Tue, Oct 30, 2012 at 9:52 PM, Ranjith <[EMAIL PROTECTED]>wrote: >>> >>>> what is the best way to convert a text file into avro format? does the >>>> file need to contain a header? sorry if this is a basic question and has >>>> been answered several times. >>>> >>>> Thanks, >>>> Ranjith >>> >>> >>> >
|
|