I am using the MERGE JOIN transformation to compare between two sources ODS.DimDepartment and DWH.DimDepartment:
I am using a Conditional Split Transformation to insert new records and update existing ones :
Insert:!ISNULL(DepartmentIdODS)&& ISNULL(DepartmentIdDWH)Update:!ISNULL(DepartmentIdODS)&&!ISNULL(DepartmentIdDWH)
The problem is my flow is taking in consideration the Insert as it is inserting the existing records when I run the package but when I use a direct query like below :
SELECT dd.DepartmentId AS DepartmentIdODS,dd.Department AS DepartmentODS,dd.GovernanceId AS GovernanceIdODS ,dd.Governance AS GovernanceODS,CHECKSUM(dd.Department,dd.GovernanceId,dd.Governance)AS DimensionChecksumODS,dd1.DepartmentSK AS DepartmentSK,dd1.DepartmentId AS DepartmentIdDWH,dd1.Department AS DepartmentDWH,dd1.GovernanceId AS GovernanceIdDWH,dd1.Governance AS GovernanceDWH,CHECKSUM(dd.Department,dd.GovernanceId,dd.Governance)AS DimensionChecksumdwhFROM ODS_Amaris.HR.DimDepartment ddLEFTOUTERJOIN HR.DimDepartment dd1 ON dd.DepartmentId = dd1.DepartmentId
It is getting me the right result with no duplicates. I want to understand the problem with MERGE JOIN component.