Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add new dimension record 1

Status
Not open for further replies.

aswolff

Programmer
Jul 31, 2006
100
0
0
US
I am very new to this and this question is more regarding design then anything else so I am sure there is more then one right answer..

I have a dimension table.
I have a fact table.
I have a staging table.

A new record shows up in the staging table. I want to add that table to fact table but the dimension does not exist.

What is the best course of action?

Do I error out the record?
Do I create the dimension record?

 
You should load and process your dimensions before it's related fact records. If you still have a fact record without corresponding dimension(s), you can do a couple of things based on your business requirements: 1. Error it out and put it in an error table for further review. 2. Assign it to a default 'UNKNOWN' dimension. 3. Add a dimension record with the business key, but with as yet to be determined attributes.

It really depends on why you are getting a fact record without the dimension(s) records and what your business requirements are for your environment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top