Hello, I tried to export some data from the database using dbunit. They encode the binary data in base64. The import also worked. Are there any plans to add such an import/export functionality to torque?
For now, I think I will combine both torque and dbunit to fullfill our requirements. Thank you for your answer. Tobias -----Ursprüngliche Nachricht----- Von: Thomas Fischer [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 3. September 2008 17:53 An: Apache Torque Developers List Betreff: RE: Importing binary data using data.xml 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. Thomas
smime.p7s
Description: S/MIME cryptographic signature
