Search code examples
sqldatabaseoracle11gobiee

How to effectively "outer join" two data sources (SQL queries) in OBIEE 11g data model?


I have two SQL queries in a data model, each for a different data source. I am trying to link one to another to the effect that creating a report with all columns will not exclude values not matching in each of the queries. Simply linking elements seems to "inner join" when creating a report (excludes values which do not match in both queries). I am looking to essentially "left join" one source with another in report creation - I WANT null values to display from the other source.

When I review the data in the data model itself (via the data tab) null values are showing. It is only in the report creation that I am having this problem.

I am not a DBA and have read-only database access. I do not have access to any OBIEE desktop tools.

Example


Solution

  • Figured it out. Trick is to add a "dummy row" via UNION to the second table and create a "dummy column" in the first table (via CASE WHEN column IS NULL) that uses some placeholder value in place of null values. Then, link both tables using the dummy column. That way the null values are not excluded in the actual column when the two queries are linked. When creating the report, just exclude the dummy column.