0
votes

I have configured a JDBConnector which inserts data into a database. The values for the query parameters come from a map returned from a custom transformer. However, even when the map value is null, Mule returns a NullPayload and the table ends up with nothing in that column.

<jdbc:connector database-ref="myDatasource" ...>
<jdbc:query key="insertData" value="insert into myTable values(#[message.payload.key])"/>
</jdbc:connector>

How can I force Mule to insert null when the actual value in the map is null?

2

2 Answers

0
votes

If the map value is null, it's expected that the column will contain no value after insertion.

0
votes

My bad, underlying information is XMl and the text nodes are being returned when encountered, simply filtering out the text nodes fixed the problem.