Re: PigServer class and script execution

2016-01-11 Thread Jianfeng (Jeff) Zhang
Do you use PigServer.registerScript(fileName) ? Then what errors do you see if you use AvroStorage ? Best Regard, Jeff Zhang On 1/11/16, 9:36 AM, "John Smith" wrote: >hi, > >i think you are answering something different. I need execute whole pig >script using

Re: PigServer class and script execution

2016-01-11 Thread John Smith
Hi, no, I create pig commands inside the Java programmer so i call *pigServer.registerQuery* Best, John On Mon, Jan 11, 2016 at 11:51 PM, Jianfeng (Jeff) Zhang < jzh...@hortonworks.com> wrote: > > Do you use PigServer.registerScript(fileName) ? Then what errors do you > see if you use

PigServer class and script execution

2016-01-11 Thread John Smith
Hi, I have a java code that generates pig script. I am wondering if there is option to execute that script directly within the java code. I found there is a option to embed pig script execution inside java code using PigServer

Re: PigServer class and script execution

2016-01-11 Thread John Smith
hi, i think you are answering something different. I need execute whole pig script using PigServer class... that apparently doesnt support AvroStorage or I can see it. best, john On Mon, Jan 11, 2016 at 6:27 PM, Jianfeng (Jeff) Zhang < jzh...@hortonworks.com> wrote: > > Of course, you can.

Casting

2016-01-11 Thread John Smith
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:

Re: PigServer class and script execution

2016-01-11 Thread Jianfeng (Jeff) Zhang
Of course, you can. AvroStorage is a built-in UDF, you just need to put pig jar on the classpath Best Regard, Jeff Zhang On 1/11/16, 4:22 AM, "John Smith" wrote: >Hi, > >I have a java code that generates pig script. I am wondering if there is >option to execute that

data types & avrostorage

2016-01-11 Thread John Smith
Hi, I loading data into pig, using LOAD without specifying datatypes. In the second step I call UDF and using AS () I set the proper data types. Typed set looks as below. grunt> describe sensitiveSet; sensitiveSet: {rank_ID: long,name: chararray,customerId: long,VIN: chararray,birth_date:

Re: Casting

2016-01-11 Thread John Smith
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 wrote: > Hi, > > Im trying to dump relation