Issue Details (XML | Word | Printable)

Key: MULE-756
Type: New Feature New Feature
Status: Closed Closed
Resolution: Duplicate
Priority: Minor Minor
Assignee: Unassigned
Reporter: Travis Carlson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mule

Create a transformer for JDBC RecordSet --> XML --> JDBC RecordSet

Created: 07/Apr/06 01:49 PM   Updated: 30/Nov/08 04:32 AM
Component/s: Core: Transformers
Affects Version/s: None
Fix Version/s: 2.1.0

Time Tracking:
Not Specified

Issue Links:
Related
 

Labels: edgvfrwd


 Description  « Hide
A transformer which takes a JDBC RecordSet and returns something like:

<table name="table1">
<row>
<field name="field1" type="string">string1</field>
<field name="field2" type="number">25</field>
<field name="field3" type="string">string2</field>
</row>
<row>
<field name="field1" type="string">string3</field>
<field name="field2" type="number">30</field>
<field name="field3" type="string">string4</field>
</row>
</table>

I'm sure there's some standard utility out there that already does this, any suggestions?



 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Travis Carlson added a comment - 07/Apr/06 01:51 PM
If a CSV file can be read into a JDBC RecordSet, the rest could be handled by MULE-756.

Andrew Perepelytsya added a comment - 07/Apr/06 01:58 PM
Jdbc RowSet. There are standard variants (CachedRowSet, WebRowSet, etc.), one of them is Xml. The point to keep an eye on is the implementation (early RI were reported to have some issues). Oracle have one of their own, containing Oracle-specific add-ons as well.

Holger Hoffstaette added a comment - 25/Jun/06 08:47 AM
As far as I can tell WebRowSet and friends require JDK-1.5. Maybe this is a good opportunity to start separating transformers into their own projects (mule-transformer-foo) so that code & dependencies don't clutter up mule-core?
I guess we can start experimenting with this when we extract all projects into a flat tree for the m2 build. The CSV transformer is another case for this - it is a great addition (the opencsv library mentioned in MULE-755 looks good) but also yet another dependency.

Andrew Perepelytsya added a comment - 25/Jun/06 12:47 PM
Well, this is not completely true. WebRowSet is a part of JDBC 3.0 spec, which had its own JSR (114, I guess), and is in now way dependant on JDK 5. It WAS bundled in JDK 5, however, but is still available as a separate download of spec api and vendor implementation, the same way as JDBC 2.0 features (DataSource, etc.) have been incorporated into JDK 1.4 the other day.

Holger Hoffstaette added a comment - 30/Jun/06 05:42 AM
Interesting news: "OpenCSV 1.5 includes changes to CSVWriter to allow for easily exporting a SQL table or query to a CVS file. The new method writeAll(ResultSet rs) makes exporting SQL to CSV a snap! "

Ross Mason added a comment - 30/Nov/08 04:32 AM
Fixed as part of the EE JDBC connector