# Using cassandra-jdbc plugin to fetch data from cassandra

**URL:** <https://discuss.elastic.co/t/using-cassandra-jdbc-plugin-to-fetch-data-from-cassandra/21980>\
**Category:** Elasticsearch\
**Created:** [February 4, 2015, 7:57pm UTC](https://discuss.elastic.co/t/using-cassandra-jdbc-plugin-to-fetch-data-from-cassandra/21980 "2015-02-04T19:57:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajay\_bh111](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@ajay\_bh111](https://discuss.elastic.co/u/ajay_bh111)\
**Post date:** [February 4, 2015, 7:57pm UTC](https://discuss.elastic.co/t/using-cassandra-jdbc-plugin-to-fetch-data-from-cassandra/21980/1 "2015-02-04T19:57:54Z")

</div>

Hi

I am trying to fetch data stored in a cassandra db into elasticsearch using  
cassandra jdbc. However I do not see any data pulled from from Cassandra.

Commands used to fetch the data are

curl -XPUT 'localhost:9200/\_river/users/\_meta' -d '{  
"type" : "jdbc",  
"schedule" : "0 0-59 0-23 ? \* \*",  
"jdbc" : {  
"url" : "jdbc:cassandra://10.236.133.64:9160/user",  
"user" : "",  
"password" : "",  
"sql" : "select \* from users",  
"poll" : "6s",  
"strategy" : "simple",  
"autocommit" : true  
},  
"index" : {  
"index" : "users",  
"bulk\_size" : 10,  
"max\_bulk\_requests" : 10,  
"bulk\_timeout" : "5s"  
}  
}'

{"\_index":"\_river","\_type":"users","\_id":"\_meta","\_version":2,"created":false}

The table contains following records  
cqlsh:user\> select \* from users;

user\_name | birth\_year | gender | password | session\_token |  
state  
-----------+------------+--------+-----------+-------------------------+-------  
mars | 1919 | F | pas | dfdfebade |  
NC  
edward | 1920 | M | abded | dfdfdefve |  
MO  
jason | 1919 | F | passw | abced |  
VA  
yamaha | 1987 | F | pdfdfe | fdfjejfjaefdfdsf |  
MN  
tom | 1919 | F | chefea | fdfafkfjkeajfklafjsd |  
TX  
John | null | null | null | null |  
ON  
zara | 1968 | F | pdfdfaerf | jfekfjfadfeffdfdsfe |  
CA  
james | 1919 | F | password | ewppafjfa1 |  
SC  
Amy | 1919 | F | password | abced |  
MO  
Jim | 1921 | F | passwordk | dfadfdsferafjeifajfefaf |  
AB

Cluster health is green,  
health status index pri rep docs.count docs.deleted store.size  
pri.store.size  
green open \_river 1 1 2 1 22.9kb  
11.5kb

Are there any additional setup required ?

Thanks  
Ajay

--  
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/a99ad8df-358b-4247-98f4-b395f96702df%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a99ad8df-358b-4247-98f4-b395f96702df%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:34am UTC](https://discuss.elastic.co/t/using-cassandra-jdbc-plugin-to-fetch-data-from-cassandra/21980/2 "2017-07-06T00:34:56Z")

</div>


