db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: Importing binary data using data.xml
Date Wed, 03 Sep 2008 17:06:54 GMT
You might also check to see if the http://db.apache.org/ddlutils/ 
Project can do this.  They (mostly) support the Torque XML format.

Another option, if you're DB servers are on the same network is
to write a simple program that reads from the MS SQL server, creates 
a bean, and then writes that bean content back to the Oracle server.
Not an ideal solution but might meet your needs.
Finally, a while back I wrote a generic XML import/export for 
Torque that could be used programmatically rather than via Ant.  It's
based on Betwixt and include a "betwixt map file generator".  This 
might be useful.  It's available at: 

> -----Original Message-----
> From: Thomas Fischer [mailto:fischer@seitenbau.net]
> Sent: Wednesday, September 03, 2008 11:53 AM
> To: Apache Torque Developers List
> Subject: RE: Importing binary data using data.xml
> The datadump and insert-sql tasks were never able to do more than
> stuff. But to be specific:
> > we are facing the requirement to initialize our database not only
> > with textual data but also with binary data (mostly xml data).
> >
> > We have a running database with the initial data on MSSQL 2005 and
> > we need to have the same for Oracle. We used the datadump mechanism
> > provided by torque to get the data from the MSSQL database. But the
> > binary data is missing.
> > Is there any possibility to handle binary data using torque with the
> > datadump and insert-sql tasks?
> Not without a patch. Probably adding this is easy. My first idea would
> be
> to base64-encode the data before storing it in xml.
> > Another problem with the datadump task are special characters. Is
> > there any possibility to give some codepage to the datadump task?
> >
> > The format of date values generated by datadump is  ?2008-01-01 20:
> > 00:00.123?.
> This probably dependas on the database against which you are running
> the
> datadump :-(
> > When I tried to insert the datadump result into the
> > MSSQL database again, the MSSQL server does not understand this
> > format, since the server is running on a german system. Any chance
> > to add the format as a parameter?
> Also not without a patch. There would be two formats:
> a) the format for xml
> b ) the format for the database
> In principle, Torque knows b), but this is not used in the datadump
> insert-sql tasks. a) would have to vbe defined by configuration.
> >
> > For the binary problem I was thinking about using some tool like
> > DBUnit, which (as far as I read) can import binary data into tables.
> > Does anyone have any experience with this?
> As far as I know, dbunit can do this, but it cannot store binary data
> in
> xml. But I may be mistaken.
>     Thomas
DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message