Freeze portion of datamart

jvoconnell
jvoconnell used Ask the Experts™
on
Experts,

We have a data mart that contains data going back 6 to 7 years. Up until now we usually roll off the earliest year. Users have requested not to roll off data any longer as well as going back earlier in time and adding more data. The older data is static. Currently our data mart process is a drop and replace. We use all surrogate keys.

My question is what are the thoughts for the best method for not having to refresh the fact and dimension tables for that older static data so as to keep the build time manageable.

Sorry in advance for the newbie methods we have thought about implementing. One idea was to build  the DM as normal with all the required data to satisfy user requirements. We thought about  finding the max Identity (PK) in each fact and dimension for records that would remain static and also set a flag on those records. Then each month delete the years of data that would need to get refreshed and perhaps reseed the table based on the highest value of the static data. Then just process the newer set of data and appending to the fact and dimensions.

We are probably way off base here. So please excuse the ignorance on our part.

Any insight is appreciated.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Analyst
Commented:
I believe you should be reading a bit first to decide what method is the best and good advice can be found here:

https://dwbi.org/etl/etl/54-incremental-loading-for-dimension-table
https://dwbi.org/etl/etl/53-methods-of-incremental-loading-in-data-warehouse

and different method like "UPSERT" here: https://www.experts-exchange.com/questions/27401511/Fact-table-incremental-insert-update-best-practice.html

Also depending on the volumes you need to refresh every time, it may be easier just to do incremental population on (very) large tables and you could also use the SQL ROWVERSION data type to identify only rows that changed for a incremental population.

https://www.codeproject.com/Articles/698025/Rowversion-datatype-in-SQL-Server-Track-which-rows

Author

Commented:
This is great. This wasn't the type of question that I would expect to get an answer I could immediately implement. I do want people to know that some research was done prior to my post but our searches didn't return much valuable. We can take what you have provided and know discuss what will work best for us. Thank you so much! You guys are great.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial