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


Data Warehouse - pseudo Junk Dimension needed?


Data Warehouse - pseudo Junk Dimension needed?

Author
Message
tiffanyjanetblack
tiffanyjanetblack
Old Hand
Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)

Group: General Forum Members
Points: 349 Visits: 354
I wanted to know what you think about this idea I propose. Have any of you had the
same situation? What did you do?

I am building a DW from ground up. SQL Server 2008.
Source System is an AS400 system. This system had edit checks on little lookup
fields (ie Payment Method) to ensure user only picks what is valid.
So I don't need to validate the code values in my SSIS pkgs.
But.....a code value of 1 or 2 is pretty useless for reporting(and 1 or 2 is what the source system sends me).
I need to know that thePaymentMethod is "Lockbox" or "ACH".

So, in my Customer MDS I have a table called Customer. It has a field called PaymentMethod
and the value is 1 (for Lockbox).
Do I store, in a junk dimension something like this:

ID Type Code Descr
1 PaymentMethod 1 Lockbox
2 PaymentMethod 2 ACH
3 TimeZone 1 Eastern
4 TimeZone 2 Mountain


and so on for all the little 3-5 available value code sets?

I"m just not certain its the best way....yet I dont want to add 10-15 more tables to
my Customer MDS either.
I could have the SSIS pkg add new records into the junk dimension as they become available,
I just don't want to hard-code these descriptions into the SQL select stmt (CASE stmt) and
then have to redeploy the pkg every time a new code is added to the source system.


Thanks!
tiffanyjanetblack
tiffanyjanetblack
Old Hand
Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)Old Hand (349 reputation)

Group: General Forum Members
Points: 349 Visits: 354
Anyone?

Also, the other problem with doing this is that I would store the ID from the junk
dimension, which effectively means that the AS400 sent me a valueof 1 for Lockbox but I
store an ID of, say, 123. Makes it easier to get the description later on, but it is
replacing the original value from the source system.

Anyone have any better ideas?
Rick Todd
Rick Todd
SSC Veteran
SSC Veteran (222 reputation)SSC Veteran (222 reputation)SSC Veteran (222 reputation)SSC Veteran (222 reputation)SSC Veteran (222 reputation)SSC Veteran (222 reputation)SSC Veteran (222 reputation)SSC Veteran (222 reputation)

Group: General Forum Members
Points: 222 Visits: 441
Boy, there are definitely multiple schools of thought on this one. I've seen a lot of systems out there that combine simple code/description pairs like that into a single table with a "type" to differentiate them, and then look those values up using the code and the type. Me? I think that's great for a transactional system, but lousy for a DW solution. Make it as easy to develop against as possible. Strive to have as little explanation needed as possible for either developers or consumers.
When I've had lots of close to useless dimensions like that in a fact table, I combine them all horizontally into a single junk dimension table, which contains the permutations of the values. So from your example it would be:
TableName: DimCustomerCheck
CustomerCheckKey BKPaymentMethodID PaymentMethod BKTimeZoneID TimeZone
1 1 LockBox 1 Eastern
2 1 LockBox 2 Mountain
3 2 ACH 1 Eastern
4 2 ACH 2 Mountain

To populate the DimCustomerCheck table, you either pre-load it with all possible combinations, all theoretical combinations (if you don't trust your business users to tell you the real list of possible combinations!) or you put in a fairly simple ETL that pulls the distinct combinations from the source system and populates new rows as you go along. Then your SSIS lookup would just be based on the BKPaymentMethodID AND the BKTimeZoneID.

Hopefully I've understood what you were asking and presented you with a viable solution,


Rick Todd
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