Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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


Copy link to this message
-
回复:how can i filter tuple that have same value in two field
i think the question is Solve。
my Expression is wrong ,modify
Expression tmp14 = filter  tmp13 by $1==$4; i have right result.

------------------ 原始邮件 ------------------
发件人: "笨猫"<[EMAIL PROTECTED]>;
发送时间: 2013年6月25日(星期二) 晚上8:05
收件人: "user"<[EMAIL PROTECTED]>;

主题: 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?
+
笨猫 2013-06-25, 12:05
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB