Import Data

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

Import Data

Grahame Jordan
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Import Data

brajeshpatel
hi Grahame,

      In web tools there's a section for Entity XML Tools for
importing and exporting data from files. For importing data from files
you can use "XML Data Import" option. Here you'll have to specify the
absolute path of the data file and check the options as per
your requirements (we've used create "Dummy" FKs).

Thanks & Regards

On Mon, Mar 17, 2008 at 8:12 AM, Grahame Jordan <[hidden email]> wrote:

> Hi,
>
> Being a noob I am just wondering how to import existing data into the
> application.
>
> I have an existing product/pricelist, the sales guys are using Goldmine
> and accounts are using Quickbooks.
>
> Initially I want to be using the pricelist ASAP.
> I have the svn trunk checked out and running.
> Many Thanks
>
> Grahame Jrodan
>



--
Brajesh Patel
HotWax Media Indore(MP)
09926276854
hotwaxmedia.com
Reply | Threaded
Open this post in threaded view
|

RE: Import Data

SkipDever
The hard part is getting the external data into an xml format and then into
the ofbiz schema.  Two of the approaches that work well is to make use of
Microsoft Access.  I am not a big fan, but it is fairly easy to use.  What I
did was to write a custom java program that generated the xml files, used
the Web Tools - Import to import the data into temporary tables, then run a
service to move the data from the temporary tables into Ofbiz.  I used the
data import tools from Opentaps as a starting point and spent probably a
month fine tuning them.  I did it this way because I had three businesses to
do.  For a one off, I think the Access tools are a better choice.

Quickbooks has a developers toolset that can help you.

Skip

-----Original Message-----
From: Brajesh Patel [mailto:[hidden email]]
Sent: Sunday, March 16, 2008 11:08 PM
To: [hidden email]
Subject: Re: Import Data


hi Grahame,

      In web tools there's a section for Entity XML Tools for
importing and exporting data from files. For importing data from files
you can use "XML Data Import" option. Here you'll have to specify the
absolute path of the data file and check the options as per
your requirements (we've used create "Dummy" FKs).

Thanks & Regards

On Mon, Mar 17, 2008 at 8:12 AM, Grahame Jordan <[hidden email]> wrote:

> Hi,
>
> Being a noob I am just wondering how to import existing data into the
> application.
>
> I have an existing product/pricelist, the sales guys are using Goldmine
> and accounts are using Quickbooks.
>
> Initially I want to be using the pricelist ASAP.
> I have the svn trunk checked out and running.
> Many Thanks
>
> Grahame Jrodan
>



--
Brajesh Patel
HotWax Media Indore(MP)
09926276854
hotwaxmedia.com

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM

Reply | Threaded
Open this post in threaded view
|

Re: Import Data

Grahame Jordan
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Import Data

Mridul Pathak-2
You can refer to applications/ecommerce/data/DemoProduct.xml.  It has Demo
Data for Facility, Catalog, ProductCategories, Variety of Products
(Physical, Digital, Virtual and Varient, Subscription, Fin Account etc.)
and the association between them.  I think this will help you to understand
the database structure as well.

On Tue, Mar 18, 2008 at 9:10 AM, Grahame Jordan <[hidden email]> wrote:

> Hi,
>
> Thanks for your replies, they are of great help.
>
> So far I have written some functions in perl to take the data from the
> original database and write it all in xml.
> This looks good so far however I am not familiar with the requirements
> of the database structure etc.
>
> Am I taking the right approach by creating Product_Categories ->
> Products -> Price.
>
>
> Cheers
>
>
> Grahame
>
>
> skip@thedevers wrote:
> > The hard part is getting the external data into an xml format and then
> into
> > the ofbiz schema.  Two of the approaches that work well is to make use
> of
> > Microsoft Access.  I am not a big fan, but it is fairly easy to use.
>  What I
> > did was to write a custom java program that generated the xml files,
> used
> > the Web Tools - Import to import the data into temporary tables, then
> run a
> > service to move the data from the temporary tables into Ofbiz.  I used
> the
> > data import tools from Opentaps as a starting point and spent probably a
> > month fine tuning them.  I did it this way because I had three
> businesses to
> > do.  For a one off, I think the Access tools are a better choice.
> >
> > Quickbooks has a developers toolset that can help you.
> >
> > Skip
> >
> > -----Original Message-----
> > From: Brajesh Patel [mailto:[hidden email]]
> > Sent: Sunday, March 16, 2008 11:08 PM
> > To: [hidden email]
> > Subject: Re: Import Data
> >
> >
> > hi Grahame,
> >
> >       In web tools there's a section for Entity XML Tools for
> > importing and exporting data from files. For importing data from files
> > you can use "XML Data Import" option. Here you'll have to specify the
> > absolute path of the data file and check the options as per
> > your requirements (we've used create "Dummy" FKs).
> >
> > Thanks & Regards
> >
> > On Mon, Mar 17, 2008 at 8:12 AM, Grahame Jordan <[hidden email]>
> wrote:
> >
> >
> >> Hi,
> >>
> >> Being a noob I am just wondering how to import existing data into the
> >> application.
> >>
> >> I have an existing product/pricelist, the sales guys are using Goldmine
> >> and accounts are using Quickbooks.
> >>
> >> Initially I want to be using the pricelist ASAP.
> >> I have the svn trunk checked out and running.
> >> Many Thanks
> >>
> >> Grahame Jrodan
> >>
> >>
> >
> >
> >
> > --
> > Brajesh Patel
> > HotWax Media Indore(MP)
> > 09926276854
> > hotwaxmedia.com
> >
> > No virus found in this incoming message.
> > Checked by AVG.
> > Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date:
> 3/14/2008
> > 12:33 PM
> >
> > No virus found in this outgoing message.
> > Checked by AVG.
> > Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date:
> 3/14/2008
> > 12:33 PM
> >
> >
>
>


--
Thanks & Regards
Mridul Pathak
Hotwax Media
http://www.hotwaxmedia.com
[hidden email]
__________________________________
Office : 509.855.4113
Mobile : +919425926892
Reply | Threaded
Open this post in threaded view
|

Re: Import Data

Ritesh Trivedi
In reply to this post by Grahame Jordan
For Data Import, you need to understand the entity relationships (data model) both of the original application as well as Ofbiz. Demo*.xml files as well as the book and online resources will help you understand the ofbiz data model. Once you do that, there are couple of options that I went with to actually import the data

1. To use scriptella.javaforge.net - a very handy and flexible framework for massaging/importing data
2. Using Entity engine - I managed to separate Entity Engine out and write utility which allows you to specify mapping fields from one data source to the Ofbiz one.

I have mentioned a few things that I learned and thought would be useful to others about Ofbiz entities and in general at ritesht.blogspot.com

Hope that helps.

Grahame Jordan wrote
Hi,

Being a noob I am just wondering how to import existing data into the
application.

I have an existing product/pricelist, the sales guys are using Goldmine
and accounts are using Quickbooks.

Initially I want to be using the pricelist ASAP.
I have the svn trunk checked out and running.
Many Thanks

Grahame Jrodan
Reply | Threaded
Open this post in threaded view
|

Infinity Values fail for Postgres

SkipDever
if you pass a value of infinity (Double.POSITIVE_INFINITY) you get an error
like this Note that  averageCost,Infinity is being converted to "1.#INF" for
the Postgres db (Using Postgres 8.2):

org.ofbiz.entity.GenericEntityException: while inserting:
[GenericEntity:InventorySoldSummary][aceptblAverage,0.0(java.lang.Double)][a
cptblMths,12(java.lang.Long)][averageCost,Infinity(java.lang.Double)][avgSal
esPrice,Infinity(java.lang.Double)][avgShipDays,2.0(java.lang.Double)][creat
edStamp,2008-03-19
19:17:14.984(java.sql.Timestamp)][createdTxStamp,2008-03-19
19:17:14.984(java.sql.Timestamp)][enumId,EOQ_NOT_SOLD(java.lang.String)][fac
ilityId,NT-Kent(java.lang.String)][lastUpdatedStamp,2008-03-19
19:17:14.984(java.sql.Timestamp)][lastUpdatedTxStamp,2008-03-19
19:17:14.984(java.sql.Timestamp)][month1,0.0(java.lang.Double)][month10,0.0(
java.lang.Double)][month11,0.0(java.lang.Double)][month12,0.0(java.lang.Doub
le)][month2,0.0(java.lang.Double)][month3,0.0(java.lang.Double)][month4,0.0(
java.lang.Double)][month5,0.0(java.lang.Double)][month6,0.0(java.lang.Double
)][month7,0.0(java.lang.Double)][month8,0.0(java.lang.Double)][month9,0.0(ja
va.lang.Double)][newestSaleDays,153(java.lang.Long)][normMth1,0.0(java.lang.
Double)][normMth10,0.0(java.lang.Double)][normMth11,0.0(java.lang.Double)][n
ormMth12,0.0(java.lang.Double)][normMth2,0.0(java.lang.Double)][normMth3,0.0
(java.lang.Double)][normMth4,0.0(java.lang.Double)][normMth5,0.0(java.lang.D
ouble)][normMth6,0.0(java.lang.Double)][normMth7,0.0(java.lang.Double)][norm
Mth8,0.0(java.lang.Double)][normMth9,0.0(java.lang.Double)][numberofsales,2(
java.lang.Long)][oldestSaleDays,153(java.lang.Long)][productId,BE22461580A15
(java.lang.String)][qtrWeightAvg,0.0(java.lang.Double)][qtyToOrder,0.0(java.
lang.Double)][quantityAverage,0.0(java.lang.Double)][quantityMax,1.0(java.la
ng.Double)][quantityMin,-1.0(java.lang.Double)][quantityTotal,0.0(java.lang.
Double)][recommended,0.0(java.lang.Double)][stdDeviation,1.0(java.lang.Doubl
e)][supplierPartyId,SHOP(java.lang.String)][weightAvgQty,0.0(java.lang.Doubl
e)] (SQL Exception while executing the following:INSERT INTO
public.INVENTORY_SOLD_SUMMARY (PRODUCT_ID, FACILITY_ID, SUPPLIER_PARTY_ID,
QUANTITY_TOTAL, ACPTBL_MTHS, QUANTITY_MIN, QUANTITY_MAX, ACEPTBL_AVERAGE,
WEIGHT_AVG_QTY, QTR_WEIGHT_AVG, QUANTITY_AVERAGE, STD_DEVIATION,
RECOMMENDED, QTY_TO_ORDER, AVAILABLE, QTY_BACK_ORDERED, AVERAGE_COST,
AVG_SALES_PRICE, NUMBEROFSALES, OLDEST_SALE_DAYS, NEWEST_SALE_DAYS,
AVG_SHIP_DAYS, MONTH1, MONTH2, MONTH3, MONTH4, MONTH5, MONTH6, MONTH7,
MONTH8, MONTH9, MONTH10, MONTH11, MONTH12, NORM_MTH1, NORM_MTH2, NORM_MTH3,
NORM_MTH4, NORM_MTH5, NORM_MTH6, NORM_MTH7, NORM_MTH8, NORM_MTH9,
NORM_MTH10, NORM_MTH11, NORM_MTH12, ENUM_ID, LAST_UPDATED_STAMP,
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR:
invalid input syntax for type numeric: "1.#INF"))

Works fine for localderby.

I fixed this in this instance by passing -1.00 which has no valid value for
this case, but it looks like a bug to me because I can imagine the need to
store infinity.


Skip


No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date: 3/18/2008
8:10 AM

Reply | Threaded
Open this post in threaded view
|

Re: Import Data

Jacques Le Roux
Administrator
In reply to this post by Ritesh Trivedi
From: "Ritz123" <[hidden email]>
> I have mentioned a few things that I learned and thought would be useful to
> others about Ofbiz entities and in general at ritesht.blogspot.com
>
> Hope that helps.

If you agree, I will review and put a link from http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo

Jacques
Reply | Threaded
Open this post in threaded view
|

Re: Import Data

Ritesh Trivedi
Sure.  Please do.


jacques.le.roux wrote
From: "Ritz123" <ritesh.trivedi@gmail.com>
> I have mentioned a few things that I learned and thought would be useful to
> others about Ofbiz entities and in general at ritesht.blogspot.com
>
> Hope that helps.

If you agree, I will review and put a link from http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo

Jacques