In the Lookup definition, on the Connection page, I would choose "Use results of a SQL query". Then I would code a SQL query like this:
SELECT Natural_Key , Surrogate_Key
FROM Any_Dim
WHERE Row_Is_Current = 'Y'
Domanda
I am new to data warehouse.
In type 2 SCD, if I understand correctly, there can be more than one records with the same natural key but different surrogate keys. Suppose in the dimension table there is a flag column with 'y' indicating active record. So when loading related fact table (foreign keys) it should look for records in dimension table of the same natural key and also flag = 'y'. How to do it in SSIS 2005? I am asking because both lookup and merge join can join only to one column. But in my case I need to join to natural key and also judge the flag.
Should I put a conditional split (to pick up only the rows with flag = y) after the lookup? Is this the best practice? Thanks.
Soluzione
In the Lookup definition, on the Connection page, I would choose "Use results of a SQL query". Then I would code a SQL query like this:
SELECT Natural_Key , Surrogate_Key
FROM Any_Dim
WHERE Row_Is_Current = 'Y'