Hi,
After reading: http://docs.ofbiz.org/display/OFBIZ/Handling+of+External+data and http://docs.ofbiz.org/display/OFBENDUSER/OFBiz%27s+Data+File+Tools I still don't really understand how to import products data. I hope someone can clarify it for me. These are the steps I guess: 1) How to determine the field name e.g. productId in <field name="productId" ignored="false" type="String"/> in xml definition file to convert the CSV File data into Entity XML File 2) Import the Entity XML File using XML Data Import in Entity Engine Tool Regards, Terence |
take a look at
https://issues.apache.org/jira/browse/OFBIZ-2518 datafile.xsd also the reference datafile tools in the http://docs.ofbiz.org/display/OFBIZ/Handling+of+External+data #2 if you use the code version instead of convert only you can just read the cvs file into ofbiz at the same time of the convert. ngterry sent the following on 9/6/2009 9:32 AM: > Hi, > > After reading: > http://docs.ofbiz.org/display/OFBIZ/Handling+of+External+data > http://docs.ofbiz.org/display/OFBIZ/Handling+of+External+data > and > http://docs.ofbiz.org/display/OFBENDUSER/OFBiz%27s+Data+File+Tools > http://docs.ofbiz.org/display/OFBENDUSER/OFBiz%27s+Data+File+Tools > > I still don't really understand how to import products data. I hope someone > can clarify it for me. These are the steps I guess: > > 1) How to determine the field name e.g. productId in <field name="productId" > ignored="false" type="String"/> in xml definition file to convert the CSV > File data into Entity XML File > > 2) Import the Entity XML File using XML Data Import in Entity Engine Tool > > Regards, > Terence -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro Systems Integrator. |
I am sorry. I still do not really understand. After a try, the sources are inputed to datasource, but I cannot find it. Where can I find it?
Steps: 1) Go to "DATA FILE TOOLS" and fill in the file link, enclosed please find the format and the files: <?xml version="1.0" encoding="UTF-8" ?> <data-files xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/datafiles.xsd"> <data-file name="productImport" separator-style="delimited" type-code="UTF-8" delimiter="	" text-delimiter="" description="this takes the product data from doba file" has-header="true"> <record name="Product" limit="many"> <field name="productId" ignored="false" type="String"/> <field name="sku" ignored="true" type="String"/> <field name="categories" ignored="true" type="String"/> <field name="brandName" ignored="false" type="String"/> <field name="price" ignored="true" type="String"/> </record> </data-file> </data-files> productImport.csv productschema.xml 2) Get the Entity XML File productOutput.xml: <?xml version="1.0" encoding="UTF-8"?> <entity-engine-xml> <Product productId=""productId"" brandName=""brandName"" /> <Product productId="20270308" brandName=""PLUSTEN"" /> <Product productId=""012224"" brandName=""ARTBOX"" /> </entity-engine-xml> 3) Go to "ENTITY ENGINE TOOLS" > "XML DATA IMPORT", input the Entity XML file, get the message input to datasource. What next? I cannot find the data. What is going wrong? Regards, Terence
|
In reply to this post by BJ Freeman
you need to remove the header from the source file.
your product name is not UTF-8 your data is not consistent Please look at the input data example and compare to the output example then compare yours against that. ngterry sent the following on 9/7/2009 1:30 AM: > I am sorry. I still do not really understand. After a try, the sources are > inputed to datasource, but I cannot find it. Where can I find it? > > Steps: > 1) Go to "DATA FILE TOOLS" and fill in the file link, enclosed please find > the format and the files: > <?xml version="1.0" encoding="UTF-8" ?> > > <data-files xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/datafiles.xsd"> > <data-file name="productImport" separator-style="delimited" > type-code="UTF-8" > delimiter="	" text-delimiter="" > description="this takes the product data from doba file" > has-header="true"> > <record name="Product" limit="many"> > <field name="productId" ignored="false" type="String"/> > <field name="sku" ignored="true" type="String"/> > <field name="categories" ignored="true" type="String"/> > <field name="brandName" ignored="false" type="String"/> > <field name="price" ignored="true" type="String"/> > </record> > </data-file> > </data-files> > > http://www.nabble.com/file/p25326822/productImport.csv productImport.csv > http://www.nabble.com/file/p25326822/productschema.xml productschema.xml > > 2) Get the Entity XML File > http://www.nabble.com/file/p25326822/productOutput.xml productOutput.xml : > <?xml version="1.0" encoding="UTF-8"?> > <entity-engine-xml> > <Product productId=""productId"" brandName=""brandName"" > /> > <Product productId="20270308" brandName=""PLUSTEN"" /> > <Product productId=""012224"" brandName=""ARTBOX"" /> > </entity-engine-xml> > > 3) Go to "ENTITY ENGINE TOOLS" > "XML DATA IMPORT", input the Entity XML > file, get the message input to datasource. > > What next? I cannot find the data. What is going wrong? > > Regards, > Terence > > > BJ Freeman wrote: >> take a look at >> https://issues.apache.org/jira/browse/OFBIZ-2518 >> datafile.xsd >> also the reference datafile tools in the >> http://docs.ofbiz.org/display/OFBIZ/Handling+of+External+data #2 >> if you use the code version instead of convert only you can just read >> the cvs file into ofbiz at the same time of the convert. >> >> ngterry sent the following on 9/6/2009 9:32 AM: >>> Hi, >>> >>> After reading: >>> http://docs.ofbiz.org/display/OFBIZ/Handling+of+External+data >>> http://docs.ofbiz.org/display/OFBIZ/Handling+of+External+data >>> and >>> http://docs.ofbiz.org/display/OFBENDUSER/OFBiz%27s+Data+File+Tools >>> http://docs.ofbiz.org/display/OFBENDUSER/OFBiz%27s+Data+File+Tools >>> >>> I still don't really understand how to import products data. I hope >>> someone >>> can clarify it for me. These are the steps I guess: >>> >>> 1) How to determine the field name e.g. productId in <field >>> name="productId" >>> ignored="false" type="String"/> in xml definition file to convert the CSV >>> File data into Entity XML File >>> >>> 2) Import the Entity XML File using XML Data Import in Entity Engine Tool >>> >>> Regards, >>> Terence >> -- >> BJ Freeman >> http://www.businessesnetwork.com/automation >> http://bjfreeman.elance.com >> http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro >> Systems Integrator. >> >> >> > -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro Systems Integrator. |
Free forum by Nabble | Edit this page |