About
Semantic Layer Modeling - Loop issue in BOBJ.
You often use BOBJ - Context in schema that contain multiple fact tables (“multiple stars”) that share lookup tables.
Articles Related
Breaking a loop
Depending on the nature of the loop, you can resolve the loop in Designer using either an alias to break the join path, or a context to separate the two join paths so that a query can only take one path or the other.
With an alias
You create an BOBJ - Alias for Country and rename it Country_Region. The two “one” ended joins are now separated as follows:
- Country keeps a join to the Resort table.
- Country_Region is joined to the Region table.
The schema now appears as shown below:
Alias are not appropriate in such schema. See Context section for the explanation.
With a context
After the creation of an alias, the addition of a new table can create a new loop join as shown below :
You must continue creating aliases for each new table you add to the schema. This is difficult to maintain, and also ends up proliferating the number of similar objects using each table in the universe.
The only way to resolve this loop is to leave the loop in place, and create a context that specifies one or the other path around the schema. This ensures that queries answer questions for one transaction or the other, such as: Is the customer information needed from the perspective of sales or reservations?
You then create different sets of objects from the tables in the different contexts. Users can then run either :
- Reservation queries
- or Sales queries,
You often use BOBJ - Context in schema that contain multiple fact tables (“multiple stars”) that share lookup tables.
Detected by
- Detect Aliases (Tools > Automated Detection > Detect Aliases)
- Detect Contexts (Tools > Automated Detection > Detect Context)
- Detect Loops (Tools > Automated Detection > Detect Loops)
- Check Integrity
- Visual analysis of schema
Solved by
Creating BOBJ - Alias and BOBJ - Context to break loops.