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

Switch to Threaded View
Pig >> mail # user >> Small question in pig


Copy link to this message
-
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