Data files in ofbiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Data files in ofbiz

viswanath
Hi All,

 Can any one help me  in importing csv files into ofbiz database as same like xml import in ofbiz-10.04
it there any way to import csv directly into database or the csv should convert into xml, also help me hw to use work with data files in ofbiz







Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Data files in ofbiz

Sumit Pandit
Hi Refer service importAddressMatchMapCsv, it should help.


On Thu, Dec 8, 2011 at 12:58 PM, viswanath <[hidden email]> wrote:

> Hi All,
>
>  Can any one help me  in importing csv files into ofbiz database as same
> like xml import in ofbiz-10.04
> it there any way to import csv directly into database or the csv should
> convert into xml, also help me hw to use work with data files in ofbiz
>
>
>
>
>
>
>
> Thanks in advance
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Data-files-in-ofbiz-tp4171814p4171814.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>



--
Thanks and Regards
Sumit Pandit
Thanks And Regards
Sumit Pandit
Reply | Threaded
Open this post in threaded view
|

Re: Data files in ofbiz

viswanath
In reply to this post by viswanath
Hi All,

     Finally i got the solution for importing csv data's into ofbiz datasource
having your csv file in ur local disk, and write a xml file as a template for the table along with field names
like

<data-files xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/datafiles.xsd">
    <data-file name="posreport" separator-style="fixed-length" type-code="text">
        <record name="tillentry" limit="many">
            <field name="tillCode" type="String" length="16" position="0"/>
            <field name="name" type="String" length="32" position="17"/>
            <field name="prodCode" type="String" length="12" position="63"/>
            <field name="quantity" type="String" length="8" position="76"/>
            <field name="totalPrice" type="String" length="8" position="85"/>
        </record>
    </data-file>
</data-files>

then mention the path of these file in working with data file in ofbiz, it will give you a xml file like
<entity-engine-xml>
<tillentry tillCode="021196033702" name="5031BB GLITTER GLUE PENS BRIGH" prodCode="5031BB" quantity="1" totalPrice="299" />
<tillentry tillCode="021196043121" name="BB4312 WONDERFOAM ASSORTED" prodCode="BB4312" quantity="1" totalPrice="280" />
<tillentry tillCode="021196055025" name="9905BB  PLUMAGE MULTICOLOURED" prodCode="9905BB" quantity="4" totalPrice="396" />
</entity-engine-xml>

then import this as usuall in the xml data import tab


Reply | Threaded
Open this post in threaded view
|

Re: Data files in ofbiz

BJ Freeman
In reply to this post by viswanath
there are threads both on dev and user mailing list
https://cwiki.apache.org/confluence/display/OFBENDUSER/OFBiz%27s+Data+File+Tools

viswanath sent the following on 12/7/2011 11:28 PM:

> Hi All,
>
>  Can any one help me  in importing csv files into ofbiz database as same
> like xml import in ofbiz-10.04
> it there any way to import csv directly into database or the csv should
> convert into xml, also help me hw to use work with data files in ofbiz
>
>
>
>
>
>
>
> Thanks in advance
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Data-files-in-ofbiz-tp4171814p4171814.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>