REGISTER 'udf.py' using jython as myfunc;
loadhtml = load './assignment/crawler' using PigStorage('\u0001') as (id1:chararray,url:chararray,domain:chararray,content:chararray,source:chararray,date:chararray);
loadhtml_content = FOREACH loadhtml generate content;
flatten = FOREACH loadhtml_content generate flatten(TOKENIZE(line)) as word;
group = GROUP flatten by word;
count = FOREACH group1 generate $0, COUNT($1);
log = FOREACH count GENERATE myfunc.nLog($0,$1,**<I need to return the row count of loadhtml_content here>**);
Я пытаюсь вернуть количество строк loadhtml_content в другой псевдоним.Я не могу придумать другую идею, чтобы сделать это.
log = FOREACH count GENERATE myfunc.nLog ($ 0, $ 1, (мне нужно здесь вернуть количество строк loadhtml_content) );