accumulating snapshot -random # of status
5 posters
Page 1 of 1
accumulating snapshot -random # of status
I need to design an order fact that can go through any number of statuses. Let's say I have 5 statuses. The order can go from status 1-3-2-3. So for the one order, there can be multiple of the same status and any number of status. How would I model this? Would I just have to have a bridge table between the order fact and the status table?
dellsters- Posts : 39
Join date : 2009-02-11
Re: accumulating snapshot -random # of status
Go deep not wide. Include date as part of the grain to cover same status over time.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: accumulating snapshot -random # of status
If you need history, you could create an accumulating snapshot fact table. Basically keep multiple versions of the fact with effective/expiration timestamps.
Re: accumulating snapshot -random # of status
BoxesAndLines wrote:Go deep not wide. Include date as part of the grain to cover same status over time.
So do you mean it is advisable to keep each and every transitional STATUS (as a surrogate key from a dimension) in a single fact table along with other required facts/measures?
Regards,
Franklin
frankee787- Posts : 6
Join date : 2012-11-26
Re: accumulating snapshot -random # of status
Yep. If you need to track each and every status change and there's no rhyme or reason to how many status changes can occur, a transactional status fact is your best bet.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: accumulating snapshot -random # of status
What about combining ngalemmo's approach with Kimball's accumulating snapshot in a single fact table as in this article:
http://www.kimballgroup.com/2012/05/01/design-tip-145-time-stamping-accumulating-snapshot-fact-tables/
Like it or not, it seems Kimball's camp have started putting effective date pair in more fact tables that have less focus on fact additivity but more on point in time factual picture.
However, I still think B&L's status transaction fact is valuable from the perspective that the number of status changes during a period of time is important, and also as the base fact for updating the accumulating snapshot.
http://www.kimballgroup.com/2012/05/01/design-tip-145-time-stamping-accumulating-snapshot-fact-tables/
Like it or not, it seems Kimball's camp have started putting effective date pair in more fact tables that have less focus on fact additivity but more on point in time factual picture.
However, I still think B&L's status transaction fact is valuable from the perspective that the number of status changes during a period of time is important, and also as the base fact for updating the accumulating snapshot.
hang- Posts : 528
Join date : 2010-05-07
Location : Brisbane, Australia
Re: accumulating snapshot -random # of status
BoxesAndLines wrote:Yep. If you need to track each and every status change and there's no rhyme or reason to how many status changes can occur, a transactional status fact is your best bet.
Thanks a lot.
Let me pin this note on my desk !!
Regards,
Franklin
frankee787- Posts : 6
Join date : 2012-11-26
Re: accumulating snapshot -random # of status
BoxesAndLines wrote:Yep. If you need to track each and every status change and there's no rhyme or reason to how many status changes can occur, a transactional status fact is your best bet.
Hmmm....Strangely after trying to go ahead with this approach I have noticed that only "STATUS" and "STATUS_TIMESTAMP" are changing mostly in the FACT table. However the other columns are quite repetitive.
eg:
ID | PROCESS_ID_KEY | SOME_COL_KEY | STATUS | STATUS_TIMESTAMP |
1 | 10 | 12345 | InProcess | 31st DEC 10:30 AM |
2 | 10 | 12345 | Issued | 31st DEC 10:35 AM |
3 | 21 | 91872 | Pending | 30st DEC 11:30 AM |
4 | 21 | 91872 | Stopped | 30st DEC 11:31 AM |
5 | 21 | 91872 | Issued | 30st DEC 11:32 AM |
Regards,
Franklin
frankee787- Posts : 6
Join date : 2012-11-26
Re: accumulating snapshot -random # of status
Nope. Within an order, I would imagine most dimensions would stay the same. Instead of a timestamp, you should be using a time and date dimension.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: accumulating snapshot -random # of status
BoxesAndLines wrote:Nope. Within an order, I would imagine most dimensions would stay the same. Instead of a timestamp, you should be using a time and date dimension.
For simplicity I have kept TIMESTAMP, but definitely it will be a DATE/TIME dimensional table.
But my query were regarding other items of an ORDER, they would all be the same for an order and hence would be repeated again and again.
We have approximately 7 or 8 attributes on our PROCESS like COL1,COL2,COL3. So would it be advisable to have them repeating in this FACT table just because the STATUS and TIMESTAMP are to be tracked?
Regards,
Franklin
frankee787- Posts : 6
Join date : 2012-11-26
Similar topics
» Can you combine an accumulating and periodic snapshot into a single accumulating periodic snapshot table?!
» Accumulating Snapshot and Transaction Snapshot
» Order fulfillment accumulating fact - problems with status movement
» Accumulating snapshot
» Fact table type
» Accumulating Snapshot and Transaction Snapshot
» Order fulfillment accumulating fact - problems with status movement
» Accumulating snapshot
» Fact table type
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum