Developer forum

Forum » Integration » Importing item relations

Importing item relations

Mark Preisler
Reply

Hey 

I’m trying to import items and item list relations into DW, but the documentation for this I not that clear about how to do it. https://doc.dynamicweb.com/documentation-9/integration/data-integration-module/integration-providers/item-provider#5471

Currently I’m trying with current example where I have a Lot item and on that item I have a item list LotInspection. But when I’m run the data import, this error is thrown. "Job Failed with the following message: Input string was not in a correct format.Couldn't store <1,2,3,4> in LotInspection Column. Expected type is Int32.".

I’m I doing anything wrong ?

<?xml version="1.0" encoding="utf-8"?>
<tables>
  <table tableName="Lot">
    <item table="Lot">
      <column columnName="Id"><![CDATA[1]]></column>
      <column columnName="Sort"><![CDATA[1]]></column>
      <column columnName="Name"><![CDATA[Lot 42]]></column>
      <column columnName="LotNumber"><![CDATA[42]]></column>
      <column columnName="LotInspection"><![CDATA[1,2,3,4]]></column>
    </item>
  </table>
  <table tableName="LotInspection">
    <item table="LotInspection">
      <column columnName="Id"><![CDATA[1]]></column>
      <column columnName="Sort"><![CDATA[1]]></column>
      <column columnName="InspectionDate"><![CDATA[01-04-2020 00:00:00:000]]></column>
      <column columnName="InspectionOfficer"><![CDATA[Tom]]></column>
      <column columnName="LotDescription"><![CDATA[Ok]]></column>
    </item>
    <item table="LotInspection">
      <column columnName="Id"><![CDATA[2]]></column>
      <column columnName="Sort"><![CDATA[2]]></column>
      <column columnName="InspectionDate"><![CDATA[01-05-2020 00:00:00:000]]></column>
      <column columnName="InspectionOfficer"><![CDATA[Tot]]></column>
      <column columnName="LotDescription"><![CDATA[Ok]]></column>
    </item>
    <item table="LotInspection">
      <column columnName="Id"><![CDATA[3]]></column>
      <column columnName="Sort"><![CDATA[3]]></column>
      <column columnName="InspectionDate"><![CDATA[01-06-2020 00:00:00:000]]></column>
      <column columnName="InspectionOfficer"><![CDATA[Bob]]></column>
      <column columnName="LotDescription"><![CDATA[Ok]]></column>
    </item>
    <item table="LotInspection">
      <column columnName="Id"><![CDATA[4]]></column>
      <column columnName="Sort"><![CDATA[4]]></column>
      <column columnName="InspectionDate"><![CDATA[01-07-2020 00:00:00:000]]></column>
      <column columnName="InspectionOfficer"><![CDATA[Ted]]></column>
      <column columnName="LotDescription"><![CDATA[Bad]]></column>
    </item>
  </table>
</tables>


Replies

 
Mikkel Ulstrup
Reply

+1

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
could you try with how it says in the documentation by setting some column for the Item that is used in the List as a PK column?
So try to add some other than "Id" column to be used in the relations between the items, see in the example from the documentation, it uses some "MainItemField1" column which is set as PK column. I think using the system "Id" column us causing this issue.
Best regards, Dmitrij

 
Mark Preisler
Reply

Hey Dmitrij

I already tried that but got the same error.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
can you attach your items definitions xml files and Data integration job xml file?
Regards, Dmitrij

 
Mark Preisler
 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
Thank you for the files. It is a bug and will be fixed in tfs# 79349.
Kind regards, Dmitrij

 
Mark Preisler
Reply

Hi Dmitrij

Thanks, is there an ETA on when we can expect a release? 

We got at project, build around the item integration and need to know if we can expect it to be fixed soon, or we should start build a custom solution.

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Mark

The problem TFS#79349 "ItemProvider: Relation list field Importing item relations broken" has now been fixed in Package "Dynamicweb.DataIntegration.Providers.ItemProvider" version 2.0.1

You are able to find this update in the backend Package update section.

Also the correction are part of the 9.8.7 release 

You are able to find this build in the download section:

http://doc.dynamicweb.com/releases-and-downloads/releases

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum