OBIEE 10G outer join - obiee

I am new to OBIEE 10G.
I have a DimA (dimension), FactA (fact). I mapped foreign key relationship between DimA and FactA on DimA.A = FactA.A in BMM, the relationship is inner and greyed out, so I can't change it to outer join.
So in the answers report, it only shows data of the inner join of the two tables. What I want is to show all items in DimA and related items of FactA or 0 for those not related.
I have posted a similar question here before https://forums.oracle.com/thread/2596618
But I still can't modify the relationship (still greyed out) even if I opened a offline repository.
And what I am thinking is is there an option in answers to dynamically control the join (inner or outer). For example, sometimes I want to show only matched DimA and FactA , sometimes all DimA and related FactA or 0, so that I don't have to modify the BMM in repository every time if the requirement changes.
What's the best practice for this case?
Thanks.
--update
I found in physical diagram, I can't change the type of relationship (complex join or foreign key). But in logical diagram I can change for both.
I found these useful:
http://everythingoracle.com/obieeldd.htm
http://obinsight.blogspot.co.uk/2010/05/understanding-complex-join-and-physical.html

If you're in OBIEE 10g, you can use a complex join. in a complex join, you can modify the join type.

Related

Can I perform a one-to-many join query using a QuerydslPredicate?

I see in this guide that providing paths as part of the predicate can generate a join:
get("/users?address.country=Spain") generates:
select user0_.id as id1_1_,
user0_.name as name2_1_
from user user0_
cross join address address1_
where user0_.id=address1_.user_id
and address1_.country='Spain'
In the example above though I see that the relationship is one-to-one.
My question is: is it possible to provide a path that goes from one-to-many in order to create an implicit outer join
e.g. in the above guide example would I be able to provide: /users?address.country=Spain if users had one-to-many relationship with address, and get back something like the following?:
user1-address1
user1-address2
user2-address3
user2-address4
I just answered this question, sort of, at least in terms of joining. I don't know what you mean by "as part of a predicate". I encourage you to research and post what you have tried before asking questions poorly on SO.
JPA Criteria: QuerySyntaxException for left join on treat entity

How to make left join on two un-related tables in hibernate query

I am trying to write a left join in hibernate query. I am not able to finish it because the two tables have no relationship.
How to make left join query in hibernate query?
If the tables have no relationship how do you expect to join them? They have to be related somehow.
Basically you need to join ON SOMETHING, if you just want data from both tables then you can query them separately.
Some more information is definitely warranted here.
Anywho, pretending that we have two tables TA and TB, if TA is connected to TB as a TA.tbData where tbData is a #OneToMany relationship, you can do something similar to:
You should have your Root from TA, let's call it here rootTA.
Join<TA, TB> fromTA = rootTA.join('tbData', JoinType.LEFT);
// your business logic here
Either way, this is very generic, without any code information or telling us what you tried, it means next nothing.
You can use DetachedCriteria that performs subquery
an example follows
DetachedCriteria personCriteria = DetachedCriteria.forClass(Person.class);
personCriteria.setProjection(Property.forName("id"));
personCriteria.add(Restrictions.eq("personLastName", "Smith"));
Criteria criteria = getSession().createCriteria(Account.class);
criteria.add(Property.forName("personId").in(personCriteria));

How to join more than two tables using Lightswitch LINQ query

I am new to lightswitch as well as linq, i am using LS 2015. I want to know how to display the data of one table in other table's screen.
For example I have job vacancies, where I want to show candidate professional information who has applied for job. These two tables are related through Candidate personal ID, means a foreign key between candidate personal table and professional table.
The relation is as follows
JobVacancies->CandidatePersonalInfor->candidateProfessionalInfo. They are many to one related.
I have written a linq query to fetch data, where i have included some other tables also, my code is as follows
Any help is appreciated.
Have you defined the relationships you describe between the entities? If so, you'll have the ability to add and drop the details you require onto the form in the designer. The entities and their properties will be in the left pane of the screen designer.
If the join operation is more complex, you can use a WCF RIA Service to create a composite entity, as described in http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/2226/Creating-a-WCF-RIA-Service-for-Visual-Studio-2013.aspx

Oracle ADF many-to-many with additional attribute

I'm developing a ADF Fusion Web Application and have some problems with EntityAssociations and ViewLinks.
I have a database table Project with id, name etc. Also I have a table Technology which only contains a id and the name of the technology, for example "ADF".
The relationship between theese two entities is many-to-many. Means one project can have multiple technologies assigned and inverse a technology can be assigned to multiple projects.
This relationship is described trough a join table named Project_Technology. Columns of this table are Project_FK, Technology_FK and Effort. Project_FK and Technology_FK are a composite primary key, Effort is an additional attribute.
Can someone explain me how to map EntityObject and ViewObjects that I can access the Effort, too? "Regular" many-to-many associations aren't that hard to implement but I am really struggling with the additional attribute.
Any help is appreciated. Thanks in advance!
Edit:
I could solve my issues. See answer below for details.
I got it working.
The Problem was the composite primary key on my join tables. It seems like ADF doesn't like them. I put a extra column ID on the join tables and now I can insert values by using the CreateInsert Data Controls.

Left Join 1 to 1/0 with llblgen?

With EF, if you navigate to a singular related entity within a select projection(such as from the many side of a many-to-one or 1-to-1/0) it would coalesce nulls and give you a left join: https://stackoverflow.com/a/2525950/84206
Since it occurs in a project and not in a join, EF makes a pretty reasonable assumption that a left join is desired.
However, I haven't found a way to accomplish this in LINQ with LLBLGen. The above technique produces an inner join with LLBGen. I can't use techniques that use DefaultIfEmpty because that's only available when navigating into a many relationship.
I am hoping to avoid using WithPath/Prefetch because I'd really like to do the projection in LINQ instead of grabbing a huge object graph into memory and do the projection in memory.
This is LLBLGen 3.5.
If the FK is nullable, the join will be a left join. If the FK isn't nullable, it will be an inner join. This is the only way it's determinable what you want as Linq lacks any other system to specify the join type in this. Your link must use a nullable (optional) FK side as well to get a left join.
If nothing helps, please use queryspec, the query api will allow you to specify the join type in any case.
ps: please next time post on our forums, we don't monitor SO every day, but we do monitor our forums.

Resources