# Jdbc river update issue

**URL:** <https://discuss.elastic.co/t/jdbc-river-update-issue/9692>\
**Category:** Elasticsearch\
**Created:** [November 13, 2012, 7:59am UTC](https://discuss.elastic.co/t/jdbc-river-update-issue/9692 "2012-11-13T07:59:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spancer\_ray](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spancer_ray/32/76303_2.png) [@spancer\_ray](https://discuss.elastic.co/u/spancer_ray)\
**Post date:** [November 13, 2012, 7:59am UTC](https://discuss.elastic.co/t/jdbc-river-update-issue/9692/1 "2012-11-13T07:59:59Z")

</div>

Hi Guys,

I'm integrating my ES with jdbc river. And I was puzzled with the update/delete operation.

I'm using the river table, and I'm confused on how to configure the river table data column 'source\_sql' while

the 'source\_operation' values 'index' or 'delete'.

My configuration of my river table on 'source\_operation' and 'source\_sql' are something like below:

source\_operation source\_sql  
index select \* from orders where quantity=44  
delete select \* from orders where quantity=55

However, while 'index', it indexed the data again, while 'delete', nothing happens to my ES index..

I tried to changed the 'source\_sql' like below, it throws the SQL exception:Can not issue data manipulation statements with executeQuery().

source\_operation source\_sql  
index update orders set quantity=444 where quantity=44  
delete delete \* from orders where quantity=55

And I also come up with another problem, while the tables' volume is big, more than 5 million rows in the table, while using jdbc river with rivertable = false, i got OOM problem. It seems river polls all the data from the source table and then indexing... Although I tried to set the 'fetchsize', doesn't help. I was wondering how you guys river big table using jdbc river.

I wish someone can give me some help.

Thanks a ton,  
Spancer

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 14, 2012, 12:43pm UTC](https://discuss.elastic.co/t/jdbc-river-update-issue/9692/2 "2012-11-14T12:43:29Z")

</div>

Hi Spancer,

"SQL exception:Can not issue data manipulation statements with  
executeQuery()" looks like a bug.

Chunking the row data that can be selected per river cycle is a nice idea.  
'fetchsize' is only a hint for the JDBC cursor cache.

Can you please post your issues  
at [GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch](https://github.com/jprante/elasticsearch-river-jdbc) ?

Thanks,

Jörg

On Tuesday, November 13, 2012 9:00:00 AM UTC+1, spancer ray wrote:

> ## Hi Guys, I'm integrating my ES with jdbc river. And I was puzzled with the update/delete operation. I'm using the river table, and I'm confused on how to configure the river table data column 'source\_sql' while the 'source\_operation' values 'index' or 'delete'. My configuration of my river table on 'source\_operation' and 'source\_sql' are something like below: source\_operation source\_sql index select \* from orders where quantity=44 delete select \* from orders where quantity=55 However, while 'index', it indexed the data again, while 'delete', nothing happens to my ES index.. I tried to changed the 'source\_sql' like below, it throws the SQL exception:Can not issue data manipulation statements with executeQuery(). source\_operation source\_sql index update orders set quantity=444 where quantity=44 delete delete \* from orders where quantity=55 And I also come up with another problem, while the tables' volume is big, more than 5 million rows in the table, while using jdbc river with rivertable = false, i got OOM problem. It seems river polls all the data from the source table and then indexing... Although I tried to set the 'fetchsize', doesn't help. I was wondering how you guys river big table using jdbc river. I wish someone can give me some help. Thanks a ton, Spancer
> 
> View this message in context: jdbc river update issue[http://elasticsearch-users.115913.n3.nabble.com/jdbc-river-update-issue-tp4025365.html](http://elasticsearch-users.115913.n3.nabble.com/jdbc-river-update-issue-tp4025365.html)  
> Sent from the Elasticsearch Users mailing list archive[http://elasticsearch-users.115913.n3.nabble.com/](http://elasticsearch-users.115913.n3.nabble.com/)at [Nabble.com](http://Nabble.com).

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:04am UTC](https://discuss.elastic.co/t/jdbc-river-update-issue/9692/3 "2017-07-06T03:04:21Z")

</div>


