Hi, When i run the following:
REGISTER /home/hduser/Documents/ccc/Research/phd/code/ECentre/scripts/bags.py USING streaming_python AS bp; raw = LOAD 'hdfs:///user/hduser/smsCorpus_en_2012.04.30_all.xml' AS (line:chararray); b = foreach raw generate bp.enumerate_bag(line); I get Failed to parse: Pig script failed to parse: <file /home/hduser/Documents/ccc/Research/phd/code/ECentre/scripts/nltk.pig, line 13, column 25> Failed to generate logical plan. Nested exception: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve bp.enumerate_bag using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.] bags.py: #!/usr/bin/env python def enumerate_bag(input): output = [] for rank, item in enumerate(input): output.append(tuple([rank] + list(item))) return output Can anyone tell me why? TIA!!!! My version is: Apache Pig version 0.12.2-SNAPSHOT (r: unknown) compiled Apr 29 2014, 13:40:45
