Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> how to use builtin String functions


+
Dexin Wang 2011-01-13, 01:43
Copy link to this message
-
Re: how to use builtin String functions
The functions need to be part of an expression in a relational operator, for example -

f = foreach l generate  REGEX_EXTRACT_ALL('192.168.1.5:8020', '(.*)\\:(.*)');

(the above example does not make much sense as none of the columns in input relation are being used.)

-Thejas
On 1/12/11 5:43 PM, "Dexin Wang" <[EMAIL PROTECTED]> wrote:

I see there are some builtin string functions, but I don't know how to use
them. I got this error when I follow the examples:

grunt> REGEX_EXTRACT_ALL('192.168.1.5:8020', '(.*)\:(.*)');
2011-01-12 19:34:23,773 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1000: Error during parsing. Encountered " <IDENTIFIER>
"REGEX_EXTRACT_ALL "" at line 1, column 1.

Thanks.
+
Dexin Wang 2011-01-14, 01:38
+
Dmitriy Ryaboy 2011-01-14, 01:50
+
Dexin Wang 2011-01-14, 02:03
+
Dmitriy Ryaboy 2011-01-14, 02:25