You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Grant Edwards <gr...@gmail.com> on 2008/01/14 20:39:18 UTC

Loading data via flat files

Hi,

The source for all my OFBiz products is a 3rd party system.

I had in mind the following :
1) Extract the products from the 3rd party system and convert the xml
document via xmlbeans into a java object.
2) Navigate the object structure and write out a flat file that can be
loaded via the Data File Library into the OFBiz database.
3) Trigger the load of the flat file automatically once writing to the flat
file is complete.

I could always have a go at writing product directly to the database, which
would give me more flexibility. At the moment however, it seems like more
work and time is of the essence.

My questions are as follows :

Is there an xsd file that describes the data requirements for loading
product data via flat files ?
What happens if the same product is loaded more than once via the Data File
Library into the same OFBiz database ?
What about product attributes, categories etc ... ? Is this defined the xml
file definitions / xsd ? I might want to load all my product into a default
category.
I imagine with a bit of code I could trigger the flat file load
automatically ?

Unfortunately the XML File Definitions (Documents
Page)<http://ofbiz.apache.org/documents.html#XMLDefs>link as defined
http://ofbiz.apache.org/docs/datafile.html returns a "404 Not Found".

And finally has anyone out there attempted something like this ?


Regards


Grant Edwards


PS : If there is more documentation in the "Data File Library" please point
me in the right direction.

Re: Loading data via flat files

Posted by BJ Freeman <bj...@free-man.net>.
should mention that the url for all xsd are now
http://ofbiz.apache.org/
you can find them in the DTD folder of each application.
the datafile one is in
/framework/datafile/dtd

BJ Freeman sent the following on 1/14/2008 12:58 PM:
> depending on how you getting the third party files.
> 1) you can write and extractor
> 2) if Xml you can use the Transforms to covert the XML format you have
> to the XML entities needed to import.
> 3) if other flat files like cvs or txt you can write a import or use the
> tranforms.
> 
> The products and other things you ask about are defined in the entitydef
>  folder for each application. They are xml files.
> you can see them in the webtools section.
> https://demo.hotwaxmedia.com/webtools/control/entitymaint
> or
> https://demo.hotwaxmedia.com/webtools/control/view/entityref
> so you can find the entity file you want.
> 
> BTW http://ofbiz.apache.org/docs/datafile.html
> works for me.
> try this one though
> http://ofbizwiki.go-integral.com/Wiki.jsp?page=ImportingData
> 
> 
> Grant Edwards sent the following on 1/14/2008 11:39 AM:
>> Hi,
>>
>> The source for all my OFBiz products is a 3rd party system.
>>
>> I had in mind the following :
>> 1) Extract the products from the 3rd party system and convert the xml
>> document via xmlbeans into a java object.
>> 2) Navigate the object structure and write out a flat file that can be
>> loaded via the Data File Library into the OFBiz database.
>> 3) Trigger the load of the flat file automatically once writing to the flat
>> file is complete.
>>
>> I could always have a go at writing product directly to the database, which
>> would give me more flexibility. At the moment however, it seems like more
>> work and time is of the essence.
>>
>> My questions are as follows :
>>
>> Is there an xsd file that describes the data requirements for loading
>> product data via flat files ?
>> What happens if the same product is loaded more than once via the Data File
>> Library into the same OFBiz database ?
>> What about product attributes, categories etc ... ? Is this defined the xml
>> file definitions / xsd ? I might want to load all my product into a default
>> category.
>> I imagine with a bit of code I could trigger the flat file load
>> automatically ?
>>
>> Unfortunately the XML File Definitions (Documents
>> Page)<http://ofbiz.apache.org/documents.html#XMLDefs>link as defined
>> http://ofbiz.apache.org/docs/datafile.html returns a "404 Not Found".
>>
>> And finally has anyone out there attempted something like this ?
>>
>>
>> Regards
>>
>>
>> Grant Edwards
>>
>>
>> PS : If there is more documentation in the "Data File Library" please point
>> me in the right direction.
>>
> 
> 
> 
> 


Re: Loading data via flat files

Posted by BJ Freeman <bj...@free-man.net>.
depending on how you getting the third party files.
1) you can write and extractor
2) if Xml you can use the Transforms to covert the XML format you have
to the XML entities needed to import.
3) if other flat files like cvs or txt you can write a import or use the
tranforms.

The products and other things you ask about are defined in the entitydef
 folder for each application. They are xml files.
you can see them in the webtools section.
https://demo.hotwaxmedia.com/webtools/control/entitymaint
or
https://demo.hotwaxmedia.com/webtools/control/view/entityref
so you can find the entity file you want.

BTW http://ofbiz.apache.org/docs/datafile.html
works for me.
try this one though
http://ofbizwiki.go-integral.com/Wiki.jsp?page=ImportingData


Grant Edwards sent the following on 1/14/2008 11:39 AM:
> Hi,
> 
> The source for all my OFBiz products is a 3rd party system.
> 
> I had in mind the following :
> 1) Extract the products from the 3rd party system and convert the xml
> document via xmlbeans into a java object.
> 2) Navigate the object structure and write out a flat file that can be
> loaded via the Data File Library into the OFBiz database.
> 3) Trigger the load of the flat file automatically once writing to the flat
> file is complete.
> 
> I could always have a go at writing product directly to the database, which
> would give me more flexibility. At the moment however, it seems like more
> work and time is of the essence.
> 
> My questions are as follows :
> 
> Is there an xsd file that describes the data requirements for loading
> product data via flat files ?
> What happens if the same product is loaded more than once via the Data File
> Library into the same OFBiz database ?
> What about product attributes, categories etc ... ? Is this defined the xml
> file definitions / xsd ? I might want to load all my product into a default
> category.
> I imagine with a bit of code I could trigger the flat file load
> automatically ?
> 
> Unfortunately the XML File Definitions (Documents
> Page)<http://ofbiz.apache.org/documents.html#XMLDefs>link as defined
> http://ofbiz.apache.org/docs/datafile.html returns a "404 Not Found".
> 
> And finally has anyone out there attempted something like this ?
> 
> 
> Regards
> 
> 
> Grant Edwards
> 
> 
> PS : If there is more documentation in the "Data File Library" please point
> me in the right direction.
>