# Logstash jdbc input timestamp parse issue

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-input-timestamp-parse-issue/91002>\
**Category:** Logstash\
**Created:** [June 27, 2017, 4:44pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-timestamp-parse-issue/91002 "2017-06-27T16:44:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hoffin\_Ag](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@Hoffin\_Ag](https://discuss.elastic.co/u/Hoffin_Ag)\
**Post date:** [June 27, 2017, 4:44pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-timestamp-parse-issue/91002/1 "2017-06-27T16:44:19Z")

</div>

Previous version of logstash2.3.4. when we updated to 5.4.1 facing issue. please resolve ASAP. Provide fix. this is major issue in production.  
Logstash Version : 5.4.1

Date Field : format (dd:mm:yy hh:mm:ss:sssss)  
exception=\>#\<Sequel::DatabaseError: Java::JavaSql::SQLException: Cannot convert value '2016-12-30 08:21:04.074000' from column to TIMESTAMP

Query : select \* from Table;

logstash Config File:

input {  
jdbc {  
type =\> "xyz"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql://server/schema?"  
jdbc\_user =\> "user"  
jdbc\_password =\> "pwd"  
lowercase\_column\_names =\> "false"  
schedule =\> "\* \* \* \* \* \*"  
statement\_filepath =\> "sqlfilepath"  
}  
}

---

<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:** [June 27, 2017, 5:25pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-timestamp-parse-issue/91002/2 "2017-06-27T17:25:58Z")

</div>

I'm not sure what's going on here, but does it help if you convert the timestamp column to a varchar in your select statement?

> please resolve ASAP. Provide fix. this is major issue in production.

This forum is not an official support channel with an SLA. Many of the people responding to questions here are volunteers with no connection to Elastic and generally don't care whether you're in a state of emergency. If you want SLA-based support Elastic offers paid options.

---

<div class="post-metadata">

**Author:** ![Hoffin\_Ag](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@Hoffin\_Ag](https://discuss.elastic.co/u/Hoffin_Ag)\
**Post date:** [June 27, 2017, 5:56pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-timestamp-parse-issue/91002/3 "2017-06-27T17:56:31Z")

</div>

if we convert timestamp field to varchar will be elastic hostogram will it recognizes as timestamp field

---

<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:** [June 27, 2017, 6:01pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-timestamp-parse-issue/91002/4 "2017-06-27T18:01:09Z")

</div>

Yes, we can deal with that. Right now I'm seeing it as a debugging aid.

---

<div class="post-metadata">

**Author:** ![Hoffin\_Ag](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@Hoffin\_Ag](https://discuss.elastic.co/u/Hoffin_Ag)\
**Post date:** [June 27, 2017, 6:07pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-timestamp-parse-issue/91002/5 "2017-06-27T18:07:36Z")

</div>

we are not using kibana using java elastic api. and also indexed time will be different than actual posted time. kibana level it can be adjusted but from java client api how to achieve this. Is there any mechanism to add time stamp with current zone difference and push it to elastic.

---

<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 25, 2017, 6:07pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-timestamp-parse-issue/91002/6 "2017-07-25T18:07:58Z")

</div>

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