Try / catch / return null seems like the exactly right thing to do.
You will not a lot of string parsing UDFs in piggybank work that way.

On Mon, Feb 6, 2012 at 3:27 PM, Russell Jurney <russell.jur...@gmail.com>wrote:

> I just had to copy CustomFormatToISO and create ForgivingCustomFormatToISO
> that does a try/catch/return null, because 0.01% of my records have bad
> RFC1123 dates in them.  This seems very, very wrong.
>
> Is there a better way than this at the moment, or is this something that
> must be addressed with ONERROR?
>
> Russ
>
> On Sun, Feb 5, 2012 at 9:04 PM, Daniel Dai <da...@hortonworks.com> wrote:
>
> > No, there is no ONERROR handle right now.
> >
> > Daniel
> >
> > On Sat, Feb 4, 2012 at 7:11 PM, Russell Jurney <russell.jur...@gmail.com
> >
> > wrote:
> > > Did ONERROR ever get built?  I have a few bad datetimes out of many
> > failing
> > > to parse, and I don't want my entire pig script dying because I lost a
> > few
> > > rows.
> > >
> > > http://wiki.apache.org/pig/PigErrorHandlingInScripts
> > >
> > > --
> > > Russell Jurney
> > > twitter.com/rjurney
> > > russell.jur...@gmail.com
> > > datasyndrome.com
> >
>
>
>
> --
> Russell Jurney
> twitter.com/rjurney
> russell.jur...@gmail.com
> datasyndrome.com
>

Reply via email to