Developer forum

Forum » Integration » Fail on importing exported CSV files.

Fail on importing exported CSV files.

Stephen Anthony Jackson
Reply

Hello.

I am trying to do a simple export/import using ECom Provider as export source (have tried both name and ID options), and  CSV provider as destination.

As part of this process, I have to delete the 3-byte headerless CSV's created for empty ecom tables. (this is a seperate issue though)

When re-importing the same tables (CSV, folder, correct delimiter and seperator etc), I get error messages about duplicate keys.

I have tried the "Discard dupe key" option. The update only existing records or update only existing products option. No matter what I do, there is an error.

The error comes from a temp table created to support the import of variants.

Basically tons of these lines

2023-10-16 13:03:03.075 The statement has been terminated.Row data: [VariantOptionsProductRelationProductId: "11238"] (System.String), [VariantOptionsProductRelationVariantId: "VARGRP48_872588"] (System.String), [VariantOptionsProductRelationAutoId: "149"] (System.Int32)  
2023-10-16 13:03:03.075 Error: Cannot insert duplicate key row in object 'dbo.EcomVariantOptionsProductRelationTempTableForBulkImport7' with unique index 'DW_PK_EcomVariantOptionsProductRelation'. The duplicate key value is (VARGRP48_872588, 11238).  
2023-10-16 13:03:03.075 The statement has been terminated.Row data: [VariantOptionsProductRelationProductId: "11238"] (System.String), [VariantOptionsProductRelationVariantId: "VARGRP48_872587"] (System.String), [VariantOptionsProductRelationAutoId: "148"] (System.Int32)  
2023-10-16 13:03:03.075 Error: Cannot insert duplicate key row in object 'dbo.EcomVariantOptionsProductRelationTempTableForBulkImport7' with unique index 'DW_PK_EcomVariantOptionsProductRelation'. The duplicate key value is (VARGRP48_872587, 11238).  
2023-10-16 13:03:03.075 The statement has been terminated.Row data: [VariantOptionsProductRelationProductId: "11238"] (System.String), [VariantOptionsProductRelationVariantId: "VARGRP48_11238"] (System.String), [VariantOptionsProductRelationAutoId: "147"] (System.Int32)  
2023-10-16 13:03:03.075 Error: Cannot insert duplicate key row in object 'dbo.EcomVariantOptionsProductRelationTempTableForBulkImport7' with unique index 'DW_PK_EcomVariantOptionsProductRelation'. The duplicate key value is (VARGRP48_11238, 11238).

Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Stephen,
does this happens during import of CSV file to the Ecom Provider used as destination? Can you try to import it when there is no duplicate rows? Can you attach a sample source CSV file and the job xml file?
BR, Dmitrij

 
Stephen Anthony Jackson
Reply

Hi Dmitriy.

I had a reply from Support on this, and they told me to use XML instead.

I tried this, and I simply get different errors instead.  (btw, I did specify to get manufacturers and groups by id, so I dont know why its exporting MANU12 to Manufacturer (it uses ID's for PrimaryGroup too when it shouldnt)

Job Failed with the following message: Write failed. Reason: Column 'FieldValueFieldId' does not belong to table EcomProductCategoryFieldValue$11. The failed input row is: [ProductId:"11238"], [ProductLanguageId:"LANG1"], [ProductVariantId:""], [ProductDefaultShopId:""], [ProductNumber:""], [ProductName:"xxxxxxxxxxx"], [ProductShortDescription:""], [ProductLongDescription:""], [ProductImageSmall:""], [ProductImageMedium:""], [ProductImageLarge:""], [ProductLink1:""], [ProductLink2:""], [ProductPrice:"0"], [ProductStock:"0"], [ProductStockGroupId:""], [ProductWeight:"179,5"], [ProductVolume:"0"], [ProductVatGrpId:""], [ProductManufacturerId:"MANU12"]  
 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Stephen,
it is not clear what is the cause here. The failed row is from the EcomProducts table. And "Write failed." message points that this is the EcomProvider used as destination so it does not have any setting for exporting Manufacturers, so it looks like you mixed EcomProvider as a Source here (then there is a radio-button to export manufacturers by Names but it will work if Manufacturer has a Name otherewise it exports its Id instead of empty Name).
So the EcomProvider is the destination provider and the message is showing that it can not import the product category field values. Maybe you can try to check the source data if it contains the right categories and right field values. Also there is an option called ""Ignore empty category field values"" so you can try to put it ON and import again.
BR, Dmitrij

 

You must be logged in to post in the forum