Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> 回复:how can i filter tuple that have same value in two field


+
笨猫 2013-06-25, 12:46
Copy link to this message
-
how can i filter tuple that have same value in two field
how can i filter tuple that have same value in two field?
my data is :
(000000000000000000,13803493583,0.4,000000000000000000,66504185,0.10869565217391304)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,66504185,0.10869565217391304)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,03518596699,0.043478260869565216)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,13081078887,0.34782608695652173)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,13466848621,0.08695652173913043)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,13803493583,0.043478260869565216)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,15235128664,0.21739130434782608)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,15601767940,0.08695652173913043)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,18978074197,0.043478260869565216)

(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,0351-8596699,0.021739130434782608)

i want to  get the last tuple  because $1==$4

but when i run the code:tmp14 = filter  tmp13 by $1!=$4;  not have right result。

anyone help me?