# Postgresql Stored Procedure integrate with elastic search

**URL:** <https://discuss.elastic.co/t/postgresql-stored-procedure-integrate-with-elastic-search/56583>\
**Category:** Elasticsearch\
**Created:** [July 28, 2016, 6:57am UTC](https://discuss.elastic.co/t/postgresql-stored-procedure-integrate-with-elastic-search/56583 "2016-07-28T06:57:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavan\_123](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Pavan\_123](https://discuss.elastic.co/u/Pavan_123)\
**Post date:** [July 28, 2016, 6:57am UTC](https://discuss.elastic.co/t/postgresql-stored-procedure-integrate-with-elastic-search/56583/1 "2016-07-28T06:57:29Z")

</div>

Hi,

I have to index Postgresql Stored Procedure which is having million of records. Can someone let me know the process how to do indexing the Stored Procedure into elasticsearch. Without using parameter i want to download whole data in elasticsearch. Please help me. Thanks in advance.

bin=/home/elasticsearch-jdbc-2.3.1.0/bin  
lib=/home/elasticsearch-jdbc-2.3.1.0/lib  
echo ' {  
"jdbc" : {  
"driver": "org.postgresql.Driver",  
"url": "jdbc:postgresql://localhost:5432/testdb",  
"user": "b2g\_mns",  
"password": "b2gmns",  
"sql" : [  
{  
"callable" : true,  
"statement" : "{call cloud10k.sp\_fs\_comp\_search(?::varchar, ?::varchar, ?::varchar, ?::bigint)}",  
"parameter" : [  
"CITI", "ALL", "ALL", 0  
]  
}  
],  
"index" : "my\_jdbc\_river03",  
"type" : "my\_jdbc\_river03"  
}  
}' | java   
-cp "/home/elasticsearch-jdbc-2.3.1.0/lib/\*"   
-Dlog4j.configurationFile=/home/elasticsearch-jdbc-2.3.1.0/bin/log4j2.xml   
org.xbib.tools.Runner   
org.xbib.tools.JDBCImporter

Thanks,  
Pavan Kumar.

---

<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, 10:32pm UTC](https://discuss.elastic.co/t/postgresql-stored-procedure-integrate-with-elastic-search/56583/2 "2017-07-05T22:32:17Z")

</div>


