Hello,
I'm trying to import assortments to a DW 9.4.12. If the assortments tables (EcomAssortments, EcomAssortmentProductRelations, EcomAssortmentPermissions) are empty, it runs fine and it works after. However if I try to run it a second time, I get a primary key error :
Job Failed with the following message: failed to move data from temporary table [dbo.EcomAssortmentPermissionsTempTableForBulkImport4] to main table [dbo.EcomAssortmentPermissions]. Exception: Violation of PRIMARY KEY constraint 'PK_EcomAssortmentPermissions'. Cannot insert duplicate key in object 'dbo.EcomAssortmentPermissions'. The duplicate key value is (SB222111, 463). The statement has been terminated. Sql query: update [dbo].[EcomAssortmentPermissions] set [AssortmentPermissionAccessUserID]=[dbo].[EcomAssortmentPermissionsTempTableForBulkImport4].[AssortmentPermissionAccessUserID] from [dbo].[EcomAssortmentPermissionsTempTableForBulkImport4] where [dbo].[EcomAssortmentPermissions].[AssortmentPermissionAssortmentID]=[dbo].[EcomAssortmentPermissionsTempTableForBulkImport4].[AssortmentPermissionAssortmentID] ; insert into [dbo].[EcomAssortmentPermissions] ([AssortmentPermissionAssortmentID],[AssortmentPermissionAccessUserID]) (select [dbo].[EcomAssortmentPermissionsTempTableForBulkImport4].[AssortmentPermissionAssortmentID], [dbo].[EcomAssortmentPermissionsTempTableForBulkImport4].[AssortmentPermissionAccessUserID] from [dbo].[EcomAssortmentPermissionsTempTableForBulkImport4] left outer join [dbo].[EcomAssortmentPermissions] on [dbo].[EcomAssortmentPermissions].[AssortmentPermissionAssortmentID]=[dbo].[EcomAssortmentPermissionsTempTableForBulkImport4].[AssortmentPermissionAssortmentID] where [dbo].[EcomAssortmentPermissions].[AssortmentPermissionAssortmentID] is null);
I'm sure my data source doesn't have any duplicate, and they two only fields I import are defined as key (see screenshot). Is there something wrong with my setup ?