4
我想做一個涉及3個表的外連接。我試着用這樣的:豬:超過2個關係的外連接
features = JOIN group_event by group left outer, group_session by group, group_order by group;
我想group_event的所有行存在於輸出,即使一個或既不其他2個的關係有一個匹配。
上述命令不起作用。很明顯,因爲它不應該工作(http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#JOIN+%28outer%29)
Outer joins will only work for two-way joins; to perform a multi-way outer join, you will need to perform multiple two-way outer join statements.
分割的作品,可以像做:
features1 = JOIN group_event by group left outer, group_session by group;
features2 = JOIN features1 by group_event::group left outer, group_order by group;
任何想法在一個命令中做到這一點? (如果我加入更多數量的表,這將會很有用)