Print this page

How to Outer Join multiple datasets

Knowledge Article Number 000240559
Description In Wave Analytics, you want to join more then 2 datasets with left or right outer joins to show only the rows that match to the left or right table. 
Resolution Please note: You have to specify the join type for each table, or the results will show an inner join by default. 
  • Example 1:
  • Results = cogroup q by ('keyQ') left,  
    a by ('keyA'), 
    b by ('keyB'), 
    c by ('keyC');
  • This will Left Outer Join the a table to the q table, but appears to inner join the rest by default.
  • Example 2:
  • Results = cogroup q by ('keyQ') left, 
    a by ('keyA) left, 
    b by ('keyB') left, 
    c by ('keyC');
  • This will Left Outer Join the a, b and c tables to the q table correctly.
  • Example 3:
  • Results = cogroup q by ('keyQ') right, 
    a by ('keyA) right, 
    b by ('keyB') right, 
    c by ('keyC');
  • This will Right Outer Join the q, b and c tables to the c table correctly.

You can also combine the joins as the developer document shows:

promote demote