dbTalk Databases Forums  

Dimensions question

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


Discuss Dimensions question in the microsoft.public.sqlserver.olap forum.



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

Default Dimensions question - 10-28-2005 , 05:36 AM






Hi all,

I am fairly new to cubing, even though i have created a few simple cubes in
the past.
However, I have a question with regards to a problem I am experincing when
adding in 3 similar dimensions and would like some advice on how to resolve
the problem.

I have the following dimensions (plus others but not listing all of them).
(Star schema)
Operator (userid)
OperatorCloser (userid)
OperatorResolver(userid)

Fact = Operator, OperatorCloser and OperatorResolver and then my measures.

The data for all 3 of these are the same but different in eachcase.
e.g. User1, User2, User3 OR User2, User2, User1 etc...

Now, when i have just 1 dimension (operator) then all is good. But , when i
bring in a second dimension (OperatorCloser or Resolver) my records counts
are hugely reduced.
I understand why in the fact that the joins used by Analysis Services will
perform a join on the Users at all all levels across all dimensions...

I hope this is clear? Basically i need to know how i can have all 3
dimensions and still return all my rows from my fact table, i guess almost
and outer join of some sort (in sql )

Regards
Immy




Reply With Quote
  #2  
Old   
SQL McOLAP
 
Posts: n/a

Default RE: Dimensions question - 10-28-2005 , 10:09 AM






Immy, this is really a SQL issue. You need to create views for each of those
dims, and join those seperate views to their respective columns in the fact
table.

In other word, create the following views:

-Operator
-OperatorCloser
-OperatorResolver

...as select * from the dim table. Yes, their data is exactly the same, but
because they're seperate instantiations of the data, you can join them to
different columns in fact without any issues.

Yukon can handle this without the seperate views, but for now, in 2000,
here's how to get around it.

Good luck.

- Phil


"Immy" wrote:

Quote:
Hi all,

I am fairly new to cubing, even though i have created a few simple cubes in
the past.
However, I have a question with regards to a problem I am experincing when
adding in 3 similar dimensions and would like some advice on how to resolve
the problem.

I have the following dimensions (plus others but not listing all of them).
(Star schema)
Operator (userid)
OperatorCloser (userid)
OperatorResolver(userid)

Fact = Operator, OperatorCloser and OperatorResolver and then my measures.

The data for all 3 of these are the same but different in eachcase.
e.g. User1, User2, User3 OR User2, User2, User1 etc...

Now, when i have just 1 dimension (operator) then all is good. But , when i
bring in a second dimension (OperatorCloser or Resolver) my records counts
are hugely reduced.
I understand why in the fact that the joins used by Analysis Services will
perform a join on the Users at all all levels across all dimensions...

I hope this is clear? Basically i need to know how i can have all 3
dimensions and still return all my rows from my fact table, i guess almost
and outer join of some sort (in sql )

Regards
Immy





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

Default Re: Dimensions question - 10-31-2005 , 03:48 AM



Thanks for your response Phil.

The way you have suggested is what I alreay have in play.
I have the exact views as you've described and I would expect them to work
too, but they're not.
The row count from my fact table is almost 50% less than when I have only 1
of these dimensions in use.

It's almost like AS performs a full join on ALL views/tables at query time
which is limiting my result set.

Confused!
Immy


"SQL McOLAP" <SQLMcOLAP (AT) discussions (DOT) microsoft.com> wrote

Quote:
Immy, this is really a SQL issue. You need to create views for each of
those
dims, and join those seperate views to their respective columns in the
fact
table.

In other word, create the following views:

-Operator
-OperatorCloser
-OperatorResolver

..as select * from the dim table. Yes, their data is exactly the same,
but
because they're seperate instantiations of the data, you can join them to
different columns in fact without any issues.

Yukon can handle this without the seperate views, but for now, in 2000,
here's how to get around it.

Good luck.

- Phil


"Immy" wrote:

Hi all,

I am fairly new to cubing, even though i have created a few simple cubes
in
the past.
However, I have a question with regards to a problem I am experincing
when
adding in 3 similar dimensions and would like some advice on how to
resolve
the problem.

I have the following dimensions (plus others but not listing all of
them).
(Star schema)
Operator (userid)
OperatorCloser (userid)
OperatorResolver(userid)

Fact = Operator, OperatorCloser and OperatorResolver and then my
measures.

The data for all 3 of these are the same but different in eachcase.
e.g. User1, User2, User3 OR User2, User2, User1 etc...

Now, when i have just 1 dimension (operator) then all is good. But , when
i
bring in a second dimension (OperatorCloser or Resolver) my records
counts
are hugely reduced.
I understand why in the fact that the joins used by Analysis Services
will
perform a join on the Users at all all levels across all dimensions...

I hope this is clear? Basically i need to know how i can have all 3
dimensions and still return all my rows from my fact table, i guess
almost
and outer join of some sort (in sql )

Regards
Immy







Reply With Quote
  #4  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Dimensions question - 11-01-2005 , 02:26 AM



Immy,

AS does indeed do full inner joins. One common way to handle this is to
setup a dimension member called something like "Unspecified" or
"Unknown". I then either map to these members during the transformations
or using a view over the fact table that coalesces nulls to the key for
these members.

Note: AS2k5 has a built-in feature to handle this situation.

--
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

In article <O0Uy5Ag3FHA.2676 (AT) TK2MSFTNGP15 (DOT) phx.gbl>,
imtiaz_ullah (AT) hotmail (DOT) com says...
Quote:
Thanks for your response Phil.

The way you have suggested is what I alreay have in play.
I have the exact views as you've described and I would expect them to work
too, but they're not.
The row count from my fact table is almost 50% less than when I have only 1
of these dimensions in use.

It's almost like AS performs a full join on ALL views/tables at query time
which is limiting my result set.

Confused!
Immy

Reply With Quote
  #5  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Dimensions question - 11-01-2005 , 12:06 PM



As Darren points out, the best approach (if you need to catch this from a
business requirement point of view) is to load AS through views and have the
view do an outer join which changes the FK pointer to the proper "unknown"
member. However, I feel compelled to point out that in most all cases, this
is caused by a data quality problem (your situation might be different, but
I still assert that it is normally related to data quality). And inproving
the data quality is a function of the ETL process -- not the AS engine. Most
folks run into this when they try to directly link their AS system with the
OLTP system without implementing a full-blown ETL process. You really should
be fixing this as part of your ETL.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Systems Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Darren Gosbell" <xxx (AT) xxx (DOT) com> wrote

Quote:
Immy,

AS does indeed do full inner joins. One common way to handle this is to
setup a dimension member called something like "Unspecified" or
"Unknown". I then either map to these members during the transformations
or using a view over the fact table that coalesces nulls to the key for
these members.

Note: AS2k5 has a built-in feature to handle this situation.

--
Regards
Darren Gosbell [MCSD]
dgosbell_at_yahoo_dot_com
Blog: http://www.geekswithblogs.net/darrengosbell

In article <O0Uy5Ag3FHA.2676 (AT) TK2MSFTNGP15 (DOT) phx.gbl>,
imtiaz_ullah (AT) hotmail (DOT) com says...
Thanks for your response Phil.

The way you have suggested is what I alreay have in play.
I have the exact views as you've described and I would expect them to
work
too, but they're not.
The row count from my fact table is almost 50% less than when I have only
1
of these dimensions in use.

It's almost like AS performs a full join on ALL views/tables at query
time
which is limiting my result set.

Confused!
Immy



Reply With Quote
  #6  
Old   
Immy
 
Posts: n/a

Default Re: Dimensions question - 11-05-2005 , 08:35 AM



I agree Dave! This was my initial response to the customer.
I hear all the suggestions and will try to use them. Thanks for all the
responses.

Immy

"Dave Wickert [MSFT]" <dwickert (AT) online (DOT) microsoft.com> wrote

Quote:
As Darren points out, the best approach (if you need to catch this from a
business requirement point of view) is to load AS through views and have
the view do an outer join which changes the FK pointer to the proper
"unknown" member. However, I feel compelled to point out that in most all
cases, this is caused by a data quality problem (your situation might be
different, but I still assert that it is normally related to data
quality). And inproving the data quality is a function of the ETL
process -- not the AS engine. Most folks run into this when they try to
directly link their AS system with the OLTP system without implementing a
full-blown ETL process. You really should be fixing this as part of your
ETL.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Systems Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no
rights.


"Darren Gosbell" <xxx (AT) xxx (DOT) com> wrote in message
news:MPG.1dd1d1895df0c9fb98978e (AT) news (DOT) microsoft.com...
Immy,

AS does indeed do full inner joins. One common way to handle this is to
setup a dimension member called something like "Unspecified" or
"Unknown". I then either map to these members during the transformations
or using a view over the fact table that coalesces nulls to the key for
these members.

Note: AS2k5 has a built-in feature to handle this situation.

--
Regards
Darren Gosbell [MCSD]
dgosbell_at_yahoo_dot_com
Blog: http://www.geekswithblogs.net/darrengosbell

In article <O0Uy5Ag3FHA.2676 (AT) TK2MSFTNGP15 (DOT) phx.gbl>,
imtiaz_ullah (AT) hotmail (DOT) com says...
Thanks for your response Phil.

The way you have suggested is what I alreay have in play.
I have the exact views as you've described and I would expect them to
work
too, but they're not.
The row count from my fact table is almost 50% less than when I have
only 1
of these dimensions in use.

It's almost like AS performs a full join on ALL views/tables at query
time
which is limiting my result set.

Confused!
Immy





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.