我有这样的输入:
100.101.74.22 {(1358308803000,start,100.101.74.22,http://server1.com/flvplay-1.26.swf%23),(1358308973000,stop,100.101.74.22,http://server1.com/flvplay-1.26.swf%23),(1358308843000,pause,100.101.74.22,http://server1.com/flvplay-1.26.swf%23)}
我写了一个这样的脚本:
A = load 'inputpath' USING PigStorage('\t') AS (f1 : chararray, B:bag{T:tuple(x1 : chararray, x2 : chararray, x3 : chararray, x4 : chararray)});
B = foreach A generate f1,flatten(B.(x1, x2,x3,x4));
我期望输出为:
100.101.74.22,1358308803000,start,100.101.74.22,http://server1.com/flvplay-1.26.swf%23,1358308973000,stop,100.101.74.22,http://server1.com/flvplay-1.26.swf%23,1358308843000,pause,100.101.74.22,http://server1.com/flvplay-1.26.swf%23
我怎么能得到那个?请帮忙。