Monday, March 2, 2015

Part 3: Incremental Upload - Using Lookup Component


Using Lookup component without using hash value, is very much similar. The only differences are:
A. In this approach, we does not need to calculate has value.
B. The Lookup component sql would be like below and change the output column with postfix as _Dest.

Continue with my Previous Posts:

Part 1: Incremental Load


SELECT
  [CustomerAlternateKey] -- this is our business key (BK)
 ,[Title]
 ,[FirstName]
 ,[MiddleName]
 ,[LastName]
 ,[BirthDate]
 ,[MaritalStatus]
 ,[Suffix]
 ,[Gender]
 ,[EmailAddress]
 ,[YearlyIncome]
 ,[TotalChildren]
 ,[NumberChildrenAtHome]
 ,[EnglishEducation]
 ,[EnglishOccupation]
 ,[HouseOwnerFlag]
 ,[NumberCarsOwned]
FROM [dbo].[MyDestination];
C. Expression in conditional status will be changes as below
(ISNULL(BirthDate) ? "" : BirthDate) != (ISNULL(BirthDate_Dest) ? "" : BirthDate_Dest)
|| (ISNULL(EmailAddress) ? "" : EmailAddress) != (ISNULL(EmailAddress_Dest) ? "" : EmailAddress_Dest)
|| (ISNULL(EnglishEducation) ? "" : EnglishEducation) != (ISNULL(EnglishEducation_Dest) ? "" : EnglishEducation_Dest)
|| (ISNULL(EnglishOccupation) ? "" : EnglishOccupation) != (ISNULL(EnglishOccupation_Dest) ? "" : EnglishOccupation_Dest)
|| (ISNULL(FirstName) ? "" : FirstName) != (ISNULL(FirstName_Dest) ? "" : FirstName_Dest)
|| (ISNULL(Gender) ? "" : Gender) != (ISNULL(Gender_Dest) ? "" : Gender_Dest)
|| (ISNULL(HouseOwnerFlag) ? "" : HouseOwnerFlag) !=(ISNULL(HouseOwnerFlag_Dest) ? "" : HouseOwnerFlag_Dest)
|| (ISNULL(LastName) ? "" : LastName) != (ISNULL(LastName_Dest) ? "" : LastName_Dest)
|| (ISNULL(MaritalStatus) ? "" : MaritalStatus) != (ISNULL(MaritalStatus_Dest) ? "" : MaritalStatus_Dest)
|| (ISNULL(MiddleName) ? "" : MiddleName) != (ISNULL(MiddleName_Dest) ? "" : MiddleName_Dest)
|| (ISNULL(NumberCarsOwned) ? "" : NumberCarsOwned) != (ISNULL(NumberCarsOwned_Dest) ? "" : NumberCarsOwned_Dest)
|| (ISNULL(NumberChildrenAtHome) ? "" : NumberChildrenAtHome) != (ISNULL(NumberChildrenAtHome_Dest) ? "" : NumberChildrenAtHome_Dest)
|| (ISNULL(Suffix) ? "" : Suffix) != (ISNULL(Suffix_Dest) ? "" : Suffix_Dest)
|| (ISNULL(Title) ? "" : Title) != (ISNULL(Title_Dest) ? "" : Title_Dest)
|| (ISNULL(TotalChildren) ? "" : TotalChildren) != (ISNULL(TotalChildren_Dest) ? "" : TotalChildren_Dest)
|| (ISNULL(YearlyIncome) ? "" : YearlyIncome) != (ISNULL(YearlyIncome_Dest) ? "" : YearlyIncome_Dest)



No comments:

Post a Comment