Wednesday, 15 July 2015

APACHE PIG CAN'T LOAD BAG -


I have a file test.txt with the following bag:

  {(es , (1,), (D, 1), (PA, 1), (RO, 1), (such, 1)} {(SS, 1), (D, 1), (this, 2) , (1), (Ps, 1), (ro, 1), (such, 1)} {(es, 1), (d, 1), (such, 1)}  
P> I want to load them into pigs

  as A = load 'test.txt' (language_bag: bag {t: (a: chararray, f: int)});  

And I get the following error.

[main] error org.apache.pig.tools.grunt.Grunt- Error 1200: mismatch input '; 'RIGHT_PAREN Expectation'

Description on logfile: /homes/ruthgavi/Projects/Conferences/PigScripts/pig_1426528460732.log

Does anyone help me to understand that What I am doing: (

It may be useful.

  A = Load Test.txt "(language_bag: bag {t: tuple (a: charrray, f: int)}); c = foreach; generated language_bag.a, language_bag.f; dump c;  

No comments:

Post a Comment