# Elasticsearch River for database

**URL:** <https://discuss.elastic.co/t/elasticsearch-river-for-database/8125>\
**Category:** Elasticsearch\
**Created:** [June 15, 2012, 5:23pm UTC](https://discuss.elastic.co/t/elasticsearch-river-for-database/8125 "2012-06-15T17:23:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kong/32/2843_2.png) [@Kong](https://discuss.elastic.co/u/Kong)\
**Post date:** [June 15, 2012, 5:23pm UTC](https://discuss.elastic.co/t/elasticsearch-river-for-database/8125/1 "2012-06-15T17:23:22Z")

</div>

Hi, I am new to Elasticsearch. I want to populate updated data from sql  
server database to Elasticsearch index, but i have some questions that not  
clear in detail.

1. Is Elasticsearch river support automatic failover?
2. Can you help me to provide resource or example code for database river?

Thank You  
Kong

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 15, 2012, 5:56pm UTC](https://discuss.elastic.co/t/elasticsearch-river-for-database/8125/2 "2012-06-15T17:56:31Z")

</div>

1. yes
2. it doesn't exist as sending docs from a YesSQL database to a NoSQL store is not trivial.

You should consider to use an ETL to extract your data (SQL, joins, ...), transform to a JSON Doc and Load it to ES.

A river could make sense, if you have a "last update field" somewhere but it's really specific to your SQL schema.

Btw, You can grab source code from CouchDb River to start.

My 2 cents.  
David 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 15 juin 2012 à 19:23, Kong [n4kong@gmail.com](mailto:n4kong@gmail.com) a écrit :

> Hi, I am new to Elasticsearch. I want to populate updated data from sql server database to Elasticsearch index, but i have some questions that not clear in detail.
> 
> 1. Is Elasticsearch river support automatic failover?
> 2. Can you help me to provide resource or example code for database river?
> 
> Thank You  
> Kong

---

<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:** [June 16, 2012, 8:53pm UTC](https://discuss.elastic.co/t/elasticsearch-river-for-database/8125/3 "2012-06-16T20:53:33Z")

</div>

I hope my JDBC river implementation at  
[GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch](https://github.com/jprante/elasticsearch-river-jdbc) is useful.

Best regards,

Jörg

On Friday, June 15, 2012 7:23:22 PM UTC+2, Kong wrote:

> Hi, I am new to Elasticsearch. I want to populate updated data from sql  
> server database to Elasticsearch index, but i have some questions that not  
> clear in detail.
> 
> 1. Is Elasticsearch river support automatic failover?
> 2. Can you help me to provide resource or example code for database river?
> 
> Thank You  
> Kong

---

<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:23am UTC](https://discuss.elastic.co/t/elasticsearch-river-for-database/8125/4 "2017-07-06T03:23:43Z")

</div>

Closed on July 6, 2017, 3:23am UTC


