Newly created entity for data migration cannot insert multiple lines in staging table.

Hi Guys,

I created new entity for “UnitOfMeasureConversion” table using the wizard. Also created generate methods on my entity class. My newly created entity works fine if I only have 1 line/record on my csv file for import but getting error below while trying to import multiple lines. Anyone has an idea? am I missing something?

Error log:

Error occurred while doing bulk copy from temp table to entity table-Cannot insert duplicate key row in object ‘dbo.DMFUNITOFMEASURECONVERSIONENTITY’ with unique index ‘I_104963CONVERSIONIDX’. The duplicate key value is (5637144576, UnitOfMeasureConversion-5, UnitOfMeasureConversion).
The statement has been terminated.
‘0’ ‘UnitOfMeasureConversion’ record(s) inserted in staging

Regards,

AML

Hello AML,

Please check if the data in the file violates the staging table index. This error usually occurs when there are duplicate records in the file that violates the index.

Update:
Already resolved the issue by fixing the index of the staging table. Now, the staging table has 3 fields (ProductNumber, ExecutionId and DefinitionGroup).

Regards,
Arnel