dbTalk Databases Forums  

One dimension - joins twice to fact at two levels

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss One dimension - joins twice to fact at two levels in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kristl
 
Posts: n/a

Default One dimension - joins twice to fact at two levels - 06-06-2006 , 12:46 PM






We have an older cube that I am trying to replicate and I don't know
how the former developer pulled off a certain trick.

He has a non-shared dimension that has a top level of TEAM (dim_team)
and a second level of AGENT (dim_agent). These roll up using a key in
the agent table that ties back to dim_team. Cool so far.

When he joins the dimension to the fact table these two dimension
source tables do not join with each other - but each joins
independently to the fact table. So dim_team joins the fact table
through team_id and dim_agent joins the fact table through agent_id.

When I try to replicate this the system won't let me. How did he create
this weird set up?


Reply With Quote
  #2  
Old   
Tiago Rente
 
Posts: n/a

Default RE: One dimension - joins twice to fact at two levels - 06-06-2006 , 01:00 PM






Hi,

In AS2K I saw this using alias. I.e., the same table/view (for 2 different
dimensions) is joined twice. However, I do not like this solution, since I
like to have shared dimensions which allows the Optimize Schema.

"kristl" wrote:

Quote:
We have an older cube that I am trying to replicate and I don't know
how the former developer pulled off a certain trick.

He has a non-shared dimension that has a top level of TEAM (dim_team)
and a second level of AGENT (dim_agent). These roll up using a key in
the agent table that ties back to dim_team. Cool so far.

When he joins the dimension to the fact table these two dimension
source tables do not join with each other - but each joins
independently to the fact table. So dim_team joins the fact table
through team_id and dim_agent joins the fact table through agent_id.

When I try to replicate this the system won't let me. How did he create
this weird set up?



Reply With Quote
  #3  
Old   
kristl
 
Posts: n/a

Default Re: One dimension - joins twice to fact at two levels - 06-06-2006 , 02:23 PM



Hi Tiago -
it's actually two different tables, same dimension. The reason we need
it is that agents change teams over time so for a given date the agent
rolls up differently under different teams and this is only evident
once the date is chosen (and fact table rows are chosen).
Kristl


Tiago Rente wrote:
Quote:
Hi,

In AS2K I saw this using alias. I.e., the same table/view (for 2 different
dimensions) is joined twice. However, I do not like this solution, since I
like to have shared dimensions which allows the Optimize Schema.

"kristl" wrote:

We have an older cube that I am trying to replicate and I don't know
how the former developer pulled off a certain trick.

He has a non-shared dimension that has a top level of TEAM (dim_team)
and a second level of AGENT (dim_agent). These roll up using a key in
the agent table that ties back to dim_team. Cool so far.

When he joins the dimension to the fact table these two dimension
source tables do not join with each other - but each joins
independently to the fact table. So dim_team joins the fact table
through team_id and dim_agent joins the fact table through agent_id.

When I try to replicate this the system won't let me. How did he create
this weird set up?




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.