Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


1 Dimension 1 Fact table connected by 2 Keys


1 Dimension 1 Fact table connected by 2 Keys

Author
Message
michaeleusebio721
michaeleusebio721
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 104
Hi, I hope all is well.

I'm having a dilemma in my cube setup and i hope you guys can help.

I have 1 cube dimension created from a UNION of 2 Dimension tables leaving me with duplicate keys on 1 column. To get around this, in my DSV I connect this dimension to the FACT table with 2 Relationships. Seen below:



Somehow this relationship is not being followed when I view the cube.

have you guys encountered this?
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16366 Visits: 13199
Two relationships are two seperate relationships (like role playing dimensions); it's not the same as one relationship with a compound key of 2 columns.

I think it would be more ideal to create a new surrogate key in your UNION ALL statement (you could use ROWNUMBER()) and create a relationship using that new surrogate key.

If you use ROWNUMBER(), you better do a full process each time, as the keys might change.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
michaeleusebio721
michaeleusebio721
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 104
Hi Koen!
Thanks for your response!

I did try your suggestion and it worked! I used a concatination of the 2 keys and some other character to make sure every key is unique and also did the same on my Fact table.

Thanks again for your help.
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16366 Visits: 13199
michaeleusebio721 (7/3/2013)
Hi Koen!
Thanks for your response!

I did try your suggestion and it worked! I used a concatination of the 2 keys and some other character to make sure every key is unique and also did the same on my Fact table.

Thanks again for your help.


No problem, glad to help and thanks for posting back!



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search