# Fetching Data from Oracle using River

**URL:** <https://discuss.elastic.co/t/fetching-data-from-oracle-using-river/45114>\
**Category:** Elasticsearch\
**Created:** [March 22, 2016, 2:08pm UTC](https://discuss.elastic.co/t/fetching-data-from-oracle-using-river/45114 "2016-03-22T14:08:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![code\_blue](https://avatars.discourse-cdn.com/v4/letter/c/7ea924/32.png) [@code\_blue](https://discuss.elastic.co/u/code_blue)\
**Post date:** [March 22, 2016, 2:08pm UTC](https://discuss.elastic.co/t/fetching-data-from-oracle-using-river/45114/1 "2016-03-22T14:08:15Z")

</div>

We are using River to fetch data from Oracle DB. In Oracle we have to use SYS\_REFCURSOR inside a Stored Proc to return some result-set using SELECT query.

Does River support fetching data using SYS\_REFCURSOR

---

<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:** [March 22, 2016, 2:31pm UTC](https://discuss.elastic.co/t/fetching-data-from-oracle-using-river/45114/2 "2016-03-22T14:31:29Z")

</div>

1. If you can use it from JDBC in a `CallableStatement`, yes.

2. Do not use river any more, it is no longer supported. Use JDBC importer or other supported tools.

---

<div class="post-metadata">

**Author:** ![code\_blue](https://avatars.discourse-cdn.com/v4/letter/c/7ea924/32.png) [@code\_blue](https://discuss.elastic.co/u/code_blue)\
**Post date:** [March 22, 2016, 2:54pm UTC](https://discuss.elastic.co/t/fetching-data-from-oracle-using-river/45114/3 "2016-03-22T14:54:08Z")

</div>

Thanks jprante for your response.  
Yes we will set the "callable" : true attribute.

How do we define the ref cursor inside register attribute?  
Any documentation link or refrence will also help.

---

<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:** [March 22, 2016, 3:30pm UTC](https://discuss.elastic.co/t/fetching-data-from-oracle-using-river/45114/4 "2016-03-22T15:30:32Z")

</div>

> [@code\_blue](#):
>
> SYS\_REFCURSOR

At the moment, the type is restricted to JDBC types, but I can change that

> <https://github.com/jprante/elasticsearch-jdbc/blob/master/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardSource.java#L931>

I think non-standard Oracle cursor is of type -10, but I'm not sure. If you can show how you want to use the callable statements, I can maybe more helpful.

---

<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 5, 2017, 11:06pm UTC](https://discuss.elastic.co/t/fetching-data-from-oracle-using-river/45114/5 "2017-07-05T23:06:14Z")

</div>


