Changing a slowly changing dimension
2 posters
Page 1 of 1
Changing a slowly changing dimension
Hi All,
So, let's say that you have an SCD type2 dimension table with these columns . . .
column_a,
column_b,
column_c,
column_d
column_f
column_a, column_b and column_c make up the changed record indicator for the table. But column_d and column_f are not tracked historically.
Then two years later, the business users decide they want to also track column_d as part of the SCD type 2 determinate.
How do you rebuild the dimension and re-sync the fact table with the dimension keys?
Thanks in advance.
Chuck
So, let's say that you have an SCD type2 dimension table with these columns . . .
column_a,
column_b,
column_c,
column_d
column_f
column_a, column_b and column_c make up the changed record indicator for the table. But column_d and column_f are not tracked historically.
Then two years later, the business users decide they want to also track column_d as part of the SCD type 2 determinate.
How do you rebuild the dimension and re-sync the fact table with the dimension keys?
Thanks in advance.
Chuck
svmayor- Posts : 3
Join date : 2013-03-06
Re: Changing a slowly changing dimension
Hi,
Can you find the history of those type 1 attributes? Most of the time that's impossible, because operational systems do not store the history.
If you can find the history, you can rebuild your dimension and then rebuild fact tables that refer to your dimension.
To rebuild the dimension, you have to join your existing dimension with the historical values that you want to add your dimension. You generate your dimension with new surrogate keys and new VALID_FROM / VALID_TO values.
And finally yo need to rebuild all fact tables that refer to your dimension because you changed the surrogate keys in your dimension. Join the old fact table to the old dimension to get the natural dimansion keys and generate an initial dataset. Join your initial dataset to the new dimension to get new surrogate key values.
Can you find the history of those type 1 attributes? Most of the time that's impossible, because operational systems do not store the history.
If you can find the history, you can rebuild your dimension and then rebuild fact tables that refer to your dimension.
To rebuild the dimension, you have to join your existing dimension with the historical values that you want to add your dimension. You generate your dimension with new surrogate keys and new VALID_FROM / VALID_TO values.
And finally yo need to rebuild all fact tables that refer to your dimension because you changed the surrogate keys in your dimension. Join the old fact table to the old dimension to get the natural dimansion keys and generate an initial dataset. Join your initial dataset to the new dimension to get new surrogate key values.
umutiscan- Posts : 51
Join date : 2010-11-26
Age : 44
Location : Istanbul, Turkey
Similar topics
» Type 3 Slowly Changing Dimension
» Slowly Changing Dimension table
» Not so slowly changing dimension attribute
» What if Natural Key changes in a Slowly Changing Dimension Type 2?
» Loading Fact Table with Type 2 Slowly Changing Dimension
» Slowly Changing Dimension table
» Not so slowly changing dimension attribute
» What if Natural Key changes in a Slowly Changing Dimension Type 2?
» Loading Fact Table with Type 2 Slowly Changing Dimension
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum