Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> PIG Regex Problems


Copy link to this message
-
PIG Regex Problems
Hi,
I'm trying to do a pretty simple regex test in PIG right now and getting
a weird error. All I'm doing is:

orig_set = load '/data/dictionaries/Eng-Spa.dic' USING PigStorage('\t')
AS (orig: CHARARRAY, trans: CHARARRAY);
filtered = FILTER orig_set BY REGEX_EXTRACT(orig, '^[\\#\\<]') == 1;

The error I get is:
2012-02-16 12:45:24,000 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1045: Could not infer the matching function for
org.apache.pig.builtin.REGEX_EXTRACT as multiple or none of them fit.
Please use an explicit cast

Ideas?

Cheers,
Eli
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB