sql server - SSIS Slowly Changing Dimension Historic Attribute -
this simple scd type 2 (historic) change available.
in image, when row updated, 2 distinct rows exist, 1 travels down 'new output' path , 1 travels down 'historical attributes inserts output'.
down path of 'historical attributes inserts output', 'derived column' adds column (or replaces column information) rowiscurrent (for example) can changed false.
down 'new output' path, row picks rowiscurrent status of 'true' @ 'derived column 1'.
what not understand purpose 'union all' serves. why there connection between 'ole db command' , union all?
if expired rows updated @ 'ole db command', being passed through, , wouldn't whatever passed through have rowiscurrent set 'true' @ 'derived column 1' before written database @ 'insert destination'?
i think answer.
records going down "new output" path records have new business key not exist in destination table.
records going down "historical attributes insert output" path business key existed in destination table, have update current flag indicator of existing record old, , insert new record current flag indicator of true.
Comments
Post a Comment