db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: Importing binary data using data.xml
Date Wed, 03 Sep 2008 15:53:06 GMT
The datadump and insert-sql tasks were never able to do more than basic 
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 and 
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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message