Even when I do explicit casting im getting same error:

sensitiveSet = foreach sensitiveSet generate (long) $0, (chararray) $1,
(long) $2, (chararray) $3, (chararray) $4, (chararray) $5;

On Mon, Jan 11, 2016 at 6:03 PM, John Smith <[email protected]> wrote:

> Hi,
>
> Im trying to dump relation into AVRO file but im getting strange error:
>  org.apache.pig.data.DataByteArray cannot be cast to java.lang.CharSequence
>
> I dont use DataByteArray (bytearray), see description of the relation
> below.
>
> sensitiveSet: {rank_ID: long,name: chararray,customerId: long,VIN:
> chararray,birth_date: chararray,fuel_mileage: chararray,fuel_consumption:
> chararray}
>
>
> STORE sensitiveSet INTO 'testOut2222.avro'
> USING org.apache.pig.piggybank.storage.avro.AvroStorage('no_schema_check',
> 'schema',
> '{"type":"record","name":"xxxx","namespace":"","fields":[{"name":"rank_ID","type":"long"},{"name":"name","type":"string","store":"no","sensitive":"na"},{"name":"customerId","type":"string","store":"yes","sensitive":"yes"},{"name":"VIN","type":"string","store":"yes","sensitive":"yes"},{"name":"birth_date","type":"string","store":"yes","sensitive":"no"},{"name":"fuel_mileage","type":"string","store":"yes","sensitive":"no"},{"name":"fuel_consumption","type":"string","store":"yes","sensitive":"no"}]}');
>
>
> Thank you
>
>
  • Casting John Smith
    • Re: Casting John Smith

Reply via email to