# ERROR on fetching data from mysql db using jdbc logstash plugin

**URL:** <https://discuss.elastic.co/t/error-on-fetching-data-from-mysql-db-using-jdbc-logstash-plugin/189683>\
**Category:** Logstash\
**Created:** [July 10, 2019, 7:53am UTC](https://discuss.elastic.co/t/error-on-fetching-data-from-mysql-db-using-jdbc-logstash-plugin/189683 "2019-07-10T07:53:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumaram](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@kumaram](https://discuss.elastic.co/u/kumaram)\
**Post date:** [July 10, 2019, 7:53am UTC](https://discuss.elastic.co/t/error-on-fetching-data-from-mysql-db-using-jdbc-logstash-plugin/189683/1 "2019-07-10T07:53:10Z")

</div>

When I try to fetch data from mysql using jdbc logstash plugin, I'm facing below error

:exception=\>#\<TypeError: no implicit conversion of Integer into String\>

It is happening with a particular table only , working for other tables.

input{  
jdbc {  
jdbc\_driver\_library =\> "/usr/share/jdbc\_driver/mysql-connector-java-5.1.47.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql://:3306/"  
jdbc\_user =\> ""  
jdbc\_password =\> "\<password"  
statement =\> "select \* from entitlement\_snapshot"

}  
}

filter {

mutate {  
convert =\> {  
"account\_only" =\> "integer"  
}

```
}

```

}

output{

```
  elasticsearch {
       hosts => ["localhost:9200"]
       index => "agco-entitlements-mysql"
       document_id => "%{id}"
 }

   stdout {
      codec => rubydebug

```

}

}

---

<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:** [August 7, 2019, 7:53am UTC](https://discuss.elastic.co/t/error-on-fetching-data-from-mysql-db-using-jdbc-logstash-plugin/189683/2 "2019-08-07T07:53:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
