# Logstash- JDBC plugin

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-plugin/49540>\
**Category:** Logstash\
**Created:** [May 9, 2016, 11:19am UTC](https://discuss.elastic.co/t/logstash-jdbc-plugin/49540 "2016-05-09T11:19:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkatesh](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@venkatesh](https://discuss.elastic.co/u/venkatesh)\
**Post date:** [May 9, 2016, 11:19am UTC](https://discuss.elastic.co/t/logstash-jdbc-plugin/49540/1 "2016-05-09T11:19:32Z")

</div>

Hi Team,

I am new to Elastic Search.I am using MYSQL database. I have 10 records and and i updated the existing record. But in elastic search i am not getting the updated table. below is my config file of logstash

input {  
jdbc {  
jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/masterdb"  
jdbc\_user =\> "venkat"  
jdbc\_validate\_connection =\> true  
jdbc\_driver\_library =\> "../jars/mysql.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
statement =\> "SELECT \* from orders"

```
}

```

}  
output {

elasticsearch {  
index =\> "orders"  
document\_type =\> "orders"  
document\_id =\> "%{orderid+''+productid}"  
hosts =\> "localhost:9200"  
}  
}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 9, 2016, 12:12pm UTC](https://discuss.elastic.co/t/logstash-jdbc-plugin/49540/2 "2016-05-09T12:12:18Z")

</div>

> ```
> document_id => "%{orderid+''+productid}"
> 
> ```

I'm pretty sure this means all your documents will literally have the id "%{orderid+''+productid}". You probably mean this:

```
document_id => "%{orderid}%{productid}"

```

---

<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, 4:58am UTC](https://discuss.elastic.co/t/logstash-jdbc-plugin/49540/3 "2017-07-06T04:58:33Z")

</div>


