我想過濾一個位置變量。位置變量上的豬過濾器
X = FILTER C BY($14 matches '.*USD.*');
STORE X into '$output' using PigStorage(',');
上述說法並不工作,但如果我嘗試只輸出$ 14
E = FOREACH C GENERATE FLATTEN($14);
STORE C into '$output' using PigStorage(',');
它工作正常
的樣本數據:
304a285281be,1383027928890968764,receiver,10C,655362,C2,USD811289,1,0,0,ebay_checkout,cc,cc,USD2659,USD120
304a285281be,1383027928890968764,receiver,10C,655362,C2,USD811289,1,0,0,ebay_checkout,cc,cc,USD2659,USD0
304a285281be,1383027928890968764,receiver,10C,655362,C2,USD811289,1,0,0,ebay_checkout,cc,cc,USD2659,GBP0
樣本輸出
304a285281be,1383027928890968764,receiver,10C,655362,C2,USD811289,1,0,0,ebay_checkout,cc,cc,USD2659,USD0
304a285281be,1383027928890968764,receiver,10C,655362,C2,USD811289,1,0,0,ebay_checkout,cc,cc,USD2659,GBP0
我的問題是chararray串轉換添加to_str($ 14),它就像一個魅力 –