Semantic Layer Modeling - Loop issue

Star Schema


Loop is a join path problem which is a set of joins that defines a closed path through a set of tables

Bobj Loop Structure Pane

How Does a Loop Affect Queries?

If you model based on the above structure, any query run against the tables in the loop would return only results where the country values for resorts and the country values for customer origin are equivalent. This double restriction on the shared lookup Country table returns fewer rows than expected.

Result Expected Result received
Bobj Loop Result Expected Bobj Loop Result Real

Country is serving two purposes:

  • Lookup for the resort country.
  • Lookup for the customer country of origin.

This creates a restriction so that data is returned only when the resort country is the same as the customer country. The resulting report shows only the number of visitors from the US who visited resorts in the US.


You can:

  • break the loop by using an alias
  • create two models

Example: with an alias You create an 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 model now appears as shown below:

Bobj Loop Resolved With Alias

Discover More
Bobj Loop Structure Pane
BOBJ - Loops

in BOBJ. “multiple stars” 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...
Data System Architecture
SQL - Joins (Home)

in SQL. A join is a SQL clause statement which define the set operation such as: intersection, union, that the database must perform between two or more relation (table, view, query, ...). The...
Star Schema
Semantic Layer - Join Path (or Query Path)

In a semantic layer, a join path is a series of joins that a semantic query can use to access data in the tables linked by the joins. Join Path problems can arise from the limited way that lookup...

Share this page:
Follow us:
Task Runner