data-warehouse

Periodic Snapshot table design


Everyone I was going through a blog and came across the concept of periodic snapshot table.

https://dwbi1.wordpress.com/2019/02/20/transactional-fact-tables/

According to this picture it says that , The records will be updated / inserted each day for the accounts with different date snapshot. I wanted to ask , Will the records be inserted as whole or only new records or only updated records. Because we will be inserting all the records again again which is quite loaded and heavy task.

enter image description here


Solution

  • That document describes including all data in every snapshot - I think there is a typo in the final diagram block where it says "Wednesday 22,000 accounts", it should say "Wednesday 24,000 accounts".

    In the real world, it would be up to you whether each snapshot contains all accounts or only those accounts that had changed since the last snapshot was created - it depends on your use cases: the overhead of duplicating unchanged records v. having to scan multiple snapshots to get the current state of all accounts