Re: PostgreSQL insert with returning clause with Camel sql component

2021-07-14 Thread Gerald Mixa
Hi, Batching once again brings up a new topic. And not all Jdbc drivers do handle that as expected or in an expected way and also sometimes incorrect. So first of all I would test again if batch insert and returning works with your Jdbc driver as you want it to. Secondly if you batch you collect

Re: PostgreSQL insert with returning clause with Camel sql component

2021-07-14 Thread Zuzana Krenkova
I am still struggling to make it work. The returning clause works fine if used with a single insert but I need to use a batch insert and then it just inserts values and does not return anything. Is there a way how to get around this? the values are taken from the body: [{new_token=5}, {new_token

Re: PostgreSQL insert with returning clause with Camel sql component

2021-07-13 Thread Zuzana Krenkova
Hi all. Well, it turned out the problem was in the parameter ... the returning clause works fine, my bad. On 2021/07/12 20:20:35, Zoran Regvart wrote: > Hi Zuzana, > have you set the `CamelSqlRetrieveGeneratedKeys=true` header? See the > documentation on that: > > https://camel.apache.org/comp

Re: PostgreSQL insert with returning clause with Camel sql component

2021-07-12 Thread Zoran Regvart
Hi Zuzana, have you set the `CamelSqlRetrieveGeneratedKeys=true` header? See the documentation on that: https://camel.apache.org/components/latest/sql-component.html#_generated_keys zoran On Mon, Jul 12, 2021 at 2:33 PM Zuzana Krenkova wrote: > > Is it possible to use PostgreSQL insert with ret

Re: PostgreSQL insert with returning clause with Camel sql component

2021-07-12 Thread Gerald Mixa
It’s hard to say more about your issue without more information. Can you supply a small sample of your failing route and it’s configuration so that it is possible to check your setup! Von meinem iPhone gesendet > Am 12.07.2021 um 17:17 schrieb Zuzana Krenkova : > > Yes, within the same applic

Re: PostgreSQL insert with returning clause with Camel sql component

2021-07-12 Thread Zuzana Krenkova
Yes, within the same application, the JDBC driver will run the insert correctly and return the values. It is just in the Camel route when nothing is returned. On 2021/07/12 13:31:26, Gerald Mixa wrote: > Hello, > Are you sure that your Jdbc driver does really return a result after > executing

Re: PostgreSQL insert with returning clause with Camel sql component

2021-07-12 Thread Gerald Mixa
Hello, Are you sure that your Jdbc driver does really return a result after executing this DML statement? Some Jdbc drivers do not return this correctly. Maybe do a little manual test with your Jdbc drivers do not handle this in a correct way! Greetings Gerald Von meinem iPhone gesendet > Am