You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Abhishek <ab...@gmail.com> on 2012/10/03 04:20:14 UTC

Small question in pig

hi all,

I am fairly new to pig.Can any one tell me how to write below hive
query in pig latin.

In this query iam using Cartesian join to achieve instring or contains in java.

Example

col1 -- 145678341212

col2 -- %67834%

insert into table t1

select t2.col1, t3.col2

from table2 t2

join table3 t3

WHERE t3.col2 IS NOT NULL

AND t2.col1 LIKE CONCAT(CONCAT('%',t3.col2),'%')

Regards
abhi
Sent from my iPhone