If you are joining on the same field, you can do that in one statement: x = join a on f1, b on f1, c on f2, d on f3...;
If however it's more of a star-like join, you have to do several joins: x = join a on f1, b on f1; xx = join x on b::f2, c on f2; .... D On Thu, May 5, 2011 at 12:06 PM, Mark Laczin <mark.lac...@gmail.com> wrote: > This is more of a "how can I do this" question. > Imagine you have an sql query like the following: > select a.f1, a.f2, a.f3, b.f1, b.f2, c.f1, c.f2, d.f1, d.f2 > from tableA a, tableB b, tableC c, tableD d > where > a.f1 = b.f1 > and b.f2 = d.f1 > and c.f2 = b.f1 > /* etc.... */ > What's the best way to replicate that query in Pig? > It's obvious to me that a simple thing could be done with a simple join. > That is, if you just had > where a.f1 = b.f1 > You can just JOIN and then foreach generate. > But with more than one clause in the where, I'm not sure of a good approach... > -Mark >