PDA

View Full Version : Outer joins and metadata



dmartynov
12-10-2008, 07:36 AM
Hi, I've read Matt's article about outer joins
http://forums.pentaho.org/showthread.php?t=60449&highlight=metadata+outer+join
, but I have the next problem (see pictuse don't pay attention on "join order keys")

I need select all activities

if in a query include for example some fields from Activity, Company, Users and Marketing Campaign - it fails

The question is how to make Activity_Details join 3 other branches, in the end of the query?

campi
12-10-2008, 01:30 PM
What do you need ? I quite don't understand ?

A simple exampe between your Activity_Detail and User :

Do you want all the activity and the asociated user (means that the users without activity details will not be retrieved) or do you want all the user and the associated activity when the activity exist ?

dmartynov
12-11-2008, 07:33 AM
I want to select all activities regadless

whether they have linked records or no, if they have, then these linked records must be displayed
whether they have marketing campaign or no, if they have, then these campaigns must be displayed
and users


The problem occurs when I select some fields from Activity_Details, Company, Marketing_Campaign, because the query is formed wrongly

with the help of join order keys (see activity_bm1var.JPG or activity_bm2var.JPG) I can make pentaho work but in such case selected data don't satisfy my needs.

because the query will be formed like this:
FROM D JOIN (C JOIN (B JOIN A))

and I need (if see picture activity_bm1var.JPG)

1 make join A
2 make join D
3 join Activity_Details with the result of 1 and 2 steps