Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SCD Type 2 - EffectiveDate Expand / Collapse
Author
Message
Posted Thursday, January 30, 2014 8:31 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 8:04 AM
Points: 2,126, Visits: 1,465
For an initial load of a new Data Warehouse, if the source systems do not store historical data, is it legitimate to populate the EffectiveDate column for Type 2 SCDs with the date that the initial load is run on?

Thanks
Lempster
Post #1536376
Posted Friday, January 31, 2014 12:43 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, October 16, 2014 8:39 PM
Points: 83, Visits: 420
I would like to know too.

In my system, I have the effective ETL load date that is used instead. That's only because if the source effective date is unknown, then my processes fail over to the last known effective date, the ETL load date.

I've been told that theory was sound, but would love to learn more.
Post #1536937
Posted Wednesday, February 12, 2014 12:40 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 28, 2014 7:12 PM
Points: 2,148, Visits: 487
I would use the most recent effective date from the source system, but also try to talk to the source system DBAs to make sure there is not an Audit database out there somewhere that could have some history/audit records.

Most importantly make sure the business stakeholders know the situation as soon as possible, and manage their expectations appropriately.
Post #1540953
Posted Friday, February 14, 2014 4:25 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 8:04 AM
Points: 2,126, Visits: 1,465
sneumersky (2/12/2014)
.... but also try to talk to the source system DBAs .....


If only there were some (or even one!).

I agree with your sentiment though.
Post #1541538
Posted Saturday, February 15, 2014 11:52 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 12:21 PM
Points: 448, Visits: 3,382
If there is a foreign key referencing your table then consider whether it's important for the date/time of the referencing row to correspond to the date/time range of your effectivedate. If referential integrity within time periods is important to you then you need a strategy that supports that, e.g. populate the referencing rows and the parent rows with the same date ranges.

David
Post #1541876
Posted Monday, February 17, 2014 6:07 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 8:04 AM
Points: 2,126, Visits: 1,465
For this particular implementation, i can't think of a scenario where a column purely used to handle a type 2 SCD for a particular attribute would be referenced by a foreign key, but I understand what you're getting at.

Regards
Lempster
Post #1542069
Posted Monday, February 17, 2014 5:50 PM This worked for the OP Answer marked as solution


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 4:12 PM
Points: 758, Visits: 1,031
If any of your transactions reference a date prior to the effective date on the dimension, this could get somewhat confusing.

For an initial load, I generally use a "placeholder" date of "19000101". That way it's obvious that the date doesn't have any meaning other than ensuring that the dimension entry is valid prior to any facts referencing it.

Alternatively, you could work out what the first date each dimension entry is referenced, and use those as the effective dates. That can be a lot of work (depending on the size of your fact tables) though, so unless you have a business case for why that would be necessary, I would suggest that a placeholder would be easier.
Post #1542320
Posted Tuesday, February 18, 2014 12:37 AM This worked for the OP Answer marked as solution


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 1:21 AM
Points: 13,236, Visits: 11,006
I use the placeholder as well.
Because you only just started recording history, the initial load is the representation of the "single version of facts" by the source system as it is known at that exact time.
You need to communicate clearly to the end users that all transaction data before the initial load is mapped to the initial view provided by the source system and that they need to take that into account when drawing conclusions.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1542397
Posted Tuesday, February 18, 2014 5:45 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 8:04 AM
Points: 2,126, Visits: 1,465
Thanls all. I think using a placeholder makes sense so that's what I'll do. Very much agree about setting user expectations!

Regards
Lempster
Post #1542506
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse