I've been using views since day 1 to source the integration and my cubes , and use it as a decouple mechanism (like Ansi-Sparc prescribes) and I think it's nice many think the same.
But when using SSIS and while sourcing the packages with the views I noticed a very strange and , dangerous, behaviour:
Sometimes they issue false surrogate keys and issue a -1 (unknown) value while an existing SK value should be issued
Further detail:
- the view is a straight select statement
- within the views I use surrogate lookup functions , for instance a snippet of a view which shows it
SELECT
etl.fn_lookup_SK_Organisation (@BK_Organisation, @startdate, @enddate), the variables are replaced by concrete attributes of the staging table.
I prefer surrogate lookups within the views, using functions, because this way I only need to maintain the surrogate lookup at one place. When using the SSIS lookup you will find yourself changing tons of packages once a lookup strategy, of a popular used dimension, is being changed.
- What is your favourite key lookup strategy?
- did you experience false key issuing?
(note : i'm not using materialized views)