# Incremental updates using the river plugin

**URL:** <https://discuss.elastic.co/t/incremental-updates-using-the-river-plugin/21726>\
**Category:** Elasticsearch\
**Created:** [January 20, 2015, 6:48am UTC](https://discuss.elastic.co/t/incremental-updates-using-the-river-plugin/21726 "2015-01-20T06:48:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![4m7u1](https://avatars.discourse-cdn.com/v4/letter/4/8e7dd6/32.png) [@4m7u1](https://discuss.elastic.co/u/4m7u1)\
**Post date:** [January 20, 2015, 6:48am UTC](https://discuss.elastic.co/t/incremental-updates-using-the-river-plugin/21726/1 "2015-01-20T06:48:01Z")

</div>

Hello,  
In order to get the incremental updates form the db, the river query has  
the following timestamp attribute.

{  
"type" : "jdbc",  
"jdbc" : {  
"url" : "jdbc:mysql://localhost:3306/test",  
"user" : "",  
"password" : "",  
"sql" : [  
{  
"statement" : "select \* from "products" where "mytimestamp" \> ?",  
"parameter" : ["$river.state.last\_active\_begin"]  
}  
],  
"index" : "my\_jdbc\_river\_index",  
"type" : "my\_jdbc\_river\_type"  
}  
}

Do I need to have a "mytimestamp" column in my db with the value as time of the insert of that particular row? Or is this a predefined attribute in elasticsearch?

Thank you.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9eba7847-db14-4398-8533-ebeacbd1ca61%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9eba7847-db14-4398-8533-ebeacbd1ca61%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:37am UTC](https://discuss.elastic.co/t/incremental-updates-using-the-river-plugin/21726/2 "2017-07-06T00:37:51Z")

</div>


