Re: Pig with avro storage

2014-10-16 Thread Serega Sheypak
It's just experience. 2014-10-16 13:51 GMT+04:00 Jakub Stransky : > I tried to pass schema directly as follows: > > STORE finaldata INTO '/user/pig/outputTest/20120422' USING AvroStorage( > > 'schema','{"type":"record","name":"PosData","namespace":"com.ncr.bigdata.dm.pif.avro","fields":[{"name":"

Re: Pig with avro storage

2014-10-16 Thread Jakub Stransky
I tried to pass schema directly as follows: STORE finaldata INTO '/user/pig/outputTest/20120422' USING AvroStorage( 'schema','{"type":"record","name":"PosData","namespace":"com.ncr.bigdata.dm.pif.avro","fields":[{"name":"Version","type":"int"},{"name":"Dob","type":{"type":"record","name":"DobType"

Re: Pig with avro storage

2014-10-16 Thread Serega Sheypak
Try not to pass schema as file, pecify schema json directly in AvroStorage configuration. I tried both approaches. 1. It's more pleasant to pass schema as url 2. If you pass schema as url you MUST map names in relation to schema. If you pass schema directly as json, you don't have to map relati

Re: Pig with avro storage

2014-10-16 Thread Jakub Stransky
STORE finaldata INTO '$OUT' USING AvroStorage('schema_uri','$SCHEMA'); OUT=/user/pig/outputTest/20120422 that is the location where I would like to get the final date store. And under the $SCHEMA variable I tried various combination: $SCHEMA=hdfs://namenodeha:8020/user/pig/outputTest/pif.json -

Re: Pig with avro storage

2014-10-15 Thread Serega Sheypak
what are values for these variables: STORE finaldata INTO '$OUT' USING AvroStorage('schema_uri','$SCHEMA'); 2014-10-15 17:51 GMT+04:00 Jakub Stransky : > No_schema_check doesn't help. Essentially we need either to remove relation > name or to ensure that schema is used during store. Here it seems

Re: Pig with avro storage

2014-10-15 Thread Jakub Stransky
No_schema_check doesn't help. Essentially we need either to remove relation name or to ensure that schema is used during store. Here it seems that even schema is supplied the internal schema take precedence. And that causes problems On 15 October 2014 15:41, praveenesh kumar wrote: > Not really

Re: Pig with avro storage

2014-10-15 Thread praveenesh kumar
Not really sure, but can you try adding 'no_schema_check'while using AvroStorage in Store function. On Wed, Oct 15, 2014 at 1:59 PM, Jakub Stransky wrote: > Hello experienced users, > > I am working with avro data files using AvroStorage and I am facing > following issue. I cannot store the data

Pig with avro storage

2014-10-15 Thread Jakub Stransky
Hello experienced users, I am working with avro data files using AvroStorage and I am facing following issue. I cannot store the data of my result back to avro data file. I have following script inputdata = load '$INP' using AvroStorage(); dirtydata = DISTINCT inputdata; sodtr = FILTER dirtydata