camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine DESSAIGNE <>
Subject Re: Possibility of jdbc component when performing a select to return a map
Date Mon, 16 Mar 2015 17:49:28 GMT

No, it's not possible. In order to be unique in your Map it has to know
which fields are part of key (assuming that you retrieve them all).

If you have camel-groovy in your project you can do the following:
GroovyExpression("request.body.collectEntries {[(it.COLUMN_A): it]}"))

Otherwise you'll have to use a custom processor.

Hope this helps,


2015-03-16 17:43 GMT+01:00 angelo.rlcosta <>:

> HI Guys,
> i'm using jdbc component to perform a selectList. I've noticed that
> according to the impl it returns a List<Map&lt;String, Object>> data =
> extractResultSetData(rs);
> Is there any type of transformation i can perform to have data like
> Map<String, Map&lt;String, Object>> so instead of a List i have a Map where
> the key is for example List[i].COLUMN_A and then the inner map the same as
> the Map in the List.
> Thanks in advance,
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

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