简体   繁体   中英

SSIS DailyETL Package Fails with FK Constraint Error

I recently downloaded clean copies of WideWorldImporters & WideWorldImportersDW from GitHub. I am following the instructions here https://learn.microsoft.com/en-us/sql/samples/wide-world-importers-generate-data?view=sql-server-ver16 . I have expanded WWI and reseeded DWH. When I run DailyETL.ispac all is well until EXEC Integration.MigrateStagedMovementData;" failed with the following error: "The MERGE statement conflicted with the FOREIGN KEY constraint "FK_Fact_Movement_Date_Key_Dimension_Date" about line 48. After much Googling around cannot seem to make any progress on finding a way forward. The 'Tech Support' link from within SSMS sends me somewhere pretty useless. Can't believe I'm the first person to have this happen. Can anyone point me in the right direction please?

Just in case anyone else is ever interested the 'expand' function cited in the link above generates additional data within WWI OLTP database. The sp EXEC Integration.PopulateDateDimensionForYear @YearNumber;(step 3 within the corresponding Daily.ETL.ispac updates Dimension.Date @ WWI OLAP for current year only. Github sample database is up-to-date as at end 2016, years 2017 through 2021 are missing from Dimension.Date hence FK lookup failure. Manually run sp via SSMS for each year missing in Dim.Date & re-run Daily.ETL.ispac

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM