You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by mallik arjun <ma...@gmail.com> on 2014/10/20 06:50:16 UTC

reg pig issue

HI hadoopers,


i have the following issue with pig





raw_log_entries = LOAD '/user/u377058/rc_app_error' USING TextLoader AS
(line:chararray);

logs_base = FOREACH raw_log_entries GENERATE
FLATTEN(
REGEX_EXTRACT_ALL(line,
'^(\\d+-\\d+-\\d+)\\s+(\\d+:\\d+:\\d+,\\d+)\\s+(\\w+)\\s+(\\w+-\\w+-\\d+-\\w+-\\d)\\s+([^\\s]+)\\s+:\\s+(.*)$'
)
) AS (
date_d chararray,
timestamp_ts chararray,
event chararray,
error_msg chararray,
package chararray,
separator chararray,
description chararray
);



when exeucting the above porgram following issue is coming.

<file rc_app_error_test.pig, line 11, column 28>  Unexpected character 'D'
2014-10-19 23:09:12,549 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: <file rc_app_error_test.pig, line 11, column 28>  Unexpected
character 'D'
Details at logfile: /home/u377058/pig_1413774551268.log


please help us

thanks in advance.

Re: reg pig issue

Posted by Jeff Zhang <zj...@gmail.com>.
Hi mallik,

You miss ":" between fieldname and field type, it should be
    date_d : chararray

On Mon, Oct 20, 2014 at 12:50 PM, mallik arjun <ma...@gmail.com>
wrote:

> HI hadoopers,
>
>
> i have the following issue with pig
>
>
>
>
>
> raw_log_entries = LOAD '/user/u377058/rc_app_error' USING TextLoader AS
> (line:chararray);
>
> logs_base = FOREACH raw_log_entries GENERATE
> FLATTEN(
> REGEX_EXTRACT_ALL(line,
> '^(\\d+-\\d+-\\d+)\\s+(\\d+:\\d+:\\d+,\\d+)\\s+(\\w+)\\s+(\\w+-\\w+-\\d+-\\w+-\\d)\\s+([^\\s]+)\\s+:\\s+(.*)$'
> )
> ) AS (
> date_d chararray,
> timestamp_ts chararray,
> event chararray,
> error_msg chararray,
> package chararray,
> separator chararray,
> description chararray
> );
>
>
>
> when exeucting the above porgram following issue is coming.
>
> <file rc_app_error_test.pig, line 11, column 28>  Unexpected character 'D'
> 2014-10-19 23:09:12,549 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1200: <file rc_app_error_test.pig, line 11, column 28>  Unexpected
> character 'D'
> Details at logfile: /home/u377058/pig_1413774551268.log
>
>
> please help us
>
> thanks in advance.
>
>
>
>


-- 
Best Regards

Jeff Zhang

Re: reg pig issue

Posted by Jeff Zhang <zj...@gmail.com>.
Hi mallik,

You miss ":" between fieldname and field type, it should be
    date_d : chararray

On Mon, Oct 20, 2014 at 12:50 PM, mallik arjun <ma...@gmail.com>
wrote:

> HI hadoopers,
>
>
> i have the following issue with pig
>
>
>
>
>
> raw_log_entries = LOAD '/user/u377058/rc_app_error' USING TextLoader AS
> (line:chararray);
>
> logs_base = FOREACH raw_log_entries GENERATE
> FLATTEN(
> REGEX_EXTRACT_ALL(line,
> '^(\\d+-\\d+-\\d+)\\s+(\\d+:\\d+:\\d+,\\d+)\\s+(\\w+)\\s+(\\w+-\\w+-\\d+-\\w+-\\d)\\s+([^\\s]+)\\s+:\\s+(.*)$'
> )
> ) AS (
> date_d chararray,
> timestamp_ts chararray,
> event chararray,
> error_msg chararray,
> package chararray,
> separator chararray,
> description chararray
> );
>
>
>
> when exeucting the above porgram following issue is coming.
>
> <file rc_app_error_test.pig, line 11, column 28>  Unexpected character 'D'
> 2014-10-19 23:09:12,549 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1200: <file rc_app_error_test.pig, line 11, column 28>  Unexpected
> character 'D'
> Details at logfile: /home/u377058/pig_1413774551268.log
>
>
> please help us
>
> thanks in advance.
>
>
>
>


-- 
Best Regards

Jeff Zhang

Re: reg pig issue

Posted by Jeff Zhang <zj...@gmail.com>.
Hi mallik,

You miss ":" between fieldname and field type, it should be
    date_d : chararray

On Mon, Oct 20, 2014 at 12:50 PM, mallik arjun <ma...@gmail.com>
wrote:

> HI hadoopers,
>
>
> i have the following issue with pig
>
>
>
>
>
> raw_log_entries = LOAD '/user/u377058/rc_app_error' USING TextLoader AS
> (line:chararray);
>
> logs_base = FOREACH raw_log_entries GENERATE
> FLATTEN(
> REGEX_EXTRACT_ALL(line,
> '^(\\d+-\\d+-\\d+)\\s+(\\d+:\\d+:\\d+,\\d+)\\s+(\\w+)\\s+(\\w+-\\w+-\\d+-\\w+-\\d)\\s+([^\\s]+)\\s+:\\s+(.*)$'
> )
> ) AS (
> date_d chararray,
> timestamp_ts chararray,
> event chararray,
> error_msg chararray,
> package chararray,
> separator chararray,
> description chararray
> );
>
>
>
> when exeucting the above porgram following issue is coming.
>
> <file rc_app_error_test.pig, line 11, column 28>  Unexpected character 'D'
> 2014-10-19 23:09:12,549 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1200: <file rc_app_error_test.pig, line 11, column 28>  Unexpected
> character 'D'
> Details at logfile: /home/u377058/pig_1413774551268.log
>
>
> please help us
>
> thanks in advance.
>
>
>
>


-- 
Best Regards

Jeff Zhang

Re: reg pig issue

Posted by Jeff Zhang <zj...@gmail.com>.
Hi mallik,

You miss ":" between fieldname and field type, it should be
    date_d : chararray

On Mon, Oct 20, 2014 at 12:50 PM, mallik arjun <ma...@gmail.com>
wrote:

> HI hadoopers,
>
>
> i have the following issue with pig
>
>
>
>
>
> raw_log_entries = LOAD '/user/u377058/rc_app_error' USING TextLoader AS
> (line:chararray);
>
> logs_base = FOREACH raw_log_entries GENERATE
> FLATTEN(
> REGEX_EXTRACT_ALL(line,
> '^(\\d+-\\d+-\\d+)\\s+(\\d+:\\d+:\\d+,\\d+)\\s+(\\w+)\\s+(\\w+-\\w+-\\d+-\\w+-\\d)\\s+([^\\s]+)\\s+:\\s+(.*)$'
> )
> ) AS (
> date_d chararray,
> timestamp_ts chararray,
> event chararray,
> error_msg chararray,
> package chararray,
> separator chararray,
> description chararray
> );
>
>
>
> when exeucting the above porgram following issue is coming.
>
> <file rc_app_error_test.pig, line 11, column 28>  Unexpected character 'D'
> 2014-10-19 23:09:12,549 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1200: <file rc_app_error_test.pig, line 11, column 28>  Unexpected
> character 'D'
> Details at logfile: /home/u377058/pig_1413774551268.log
>
>
> please help us
>
> thanks in advance.
>
>
>
>


-- 
Best Regards

Jeff Zhang