My experience with the data file tool is that it does not support multiple entities in a single data file definition.
For more complex imports I usually write a simple method if there is enough data to justify it or if I will need to do it more than once. ----- Original Message ----- From: "Simon Hutchinson" <[email protected]> To: [email protected] Sent: Monday, September 28, 2009 5:36:54 AM GMT -07:00 US/Canada Mountain Subject: Multiple records with Data Files Tool Hi All, I am looking into using the Data Files for an import. I have create a csv file with 2 fields for productId and internalName. Using the following defintion <data-file name="test" separator-style="delimited" type-code="text" delimiter=","> <record name="Product" > <field name="productId" position="0" type="String"/> <field name="internalName" position="1" type="String"/> <field name="productTypeId" type="String" default- value="DIGITAL_GOOD" expression="true"/> </record> </data-file> I am able to create an entity xml file as desired. However what i would like to be able to do is to create related records for a single row from the CSV file. For example if I want to create a ProductRelated entity for the same productId then I hope to be able to use something like <data-file name="test" separator-style="delimited" type-code="text" delimiter=","> <record name="Product" > <field name="productId" position="0" type="String"/> <field name="internalName" position="1" type="String"/> <field name="productTypeId" type="String" default- value="DIGITAL_GOOD" expression="true"/> </record> <record name="ProductRelated" > <field name="productId" position="0" type="String"/> <field name="data" position="2" type="String"/> </record> </data-file> However the entity file only ever seems to contain the xml for the first record, in this case Product, that I defined. Could someone please let me know how to create a data-file that allows for multiple entities to be created per row of input. Kind Regards Simon Hutchinson t: +44 (0)20 7033 2333 m: +44 (0)7595 020569 f: +44 (0)20 7033 2330 a: Ixxus Limited, Holywell Centre, 1 Phipp Street, London, EC2A 4PS United Kingdom. www.ixxus.com <http://www.ixxus.com/> This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.
