pig-user  

Re: piggybank apachelogparser.DateExtractor problem

hc busy
Wed, 17 Mar 2010 10:12:36 -0700

There is another way to do this. I wrote a UDF that takes unix `date` format
and converts date to a string


OUTPUT = FOREACH table GENERATE *, my.udf.formatDate('%Y-%m-%d',
date_field);

which works great, and allows you to write fairly general formatting code.

On Wed, Mar 17, 2010 at 10:01 AM, Johannes Rußek <
johannes.rus...@io-consulting.net> wrote:

> Am 17.03.2010 17:43, schrieb Dmitriy Ryaboy:
>
>  Ah, sorry, shouldn't have assumed.
>> Yes, on the jira in http://issues.apache.org/jira/browse/PIG -- just
>> click
>> on "create new issue" and go from there.
>> Welcome to apache project stuff :).
>>
>> -D
>>
>>
>
> Hi Dmitriy,
> thank you and done: PIG-1303
> I will also file a bug against it to be able to set a different locale in
> the pig script, because my locale on my workstation is a german one, yet our
> apache logs are create with the standard english one in the dateformat.
> DateExtractor then fails to parse the log data since it's not in the german
> format.. tbh, i've never seen apache log in a different locale than english
> :)
> Johannes
>