# Cannot properly assign timestamp tracking column value (JDBC plugin)

**URL:** <https://discuss.elastic.co/t/cannot-properly-assign-timestamp-tracking-column-value-jdbc-plugin/100177>\
**Category:** Logstash\
**Created:** [September 12, 2017, 8:55am UTC](https://discuss.elastic.co/t/cannot-properly-assign-timestamp-tracking-column-value-jdbc-plugin/100177 "2017-09-12T08:55:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![c\_sharper](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@c\_sharper](https://discuss.elastic.co/u/c_sharper)\
**Post date:** [September 12, 2017, 8:55am UTC](https://discuss.elastic.co/t/cannot-properly-assign-timestamp-tracking-column-value-jdbc-plugin/100177/1 "2017-09-12T08:55:13Z")

</div>

I have problem with assigning properly last 'sql\_last\_value'. I wanted to assign it with my last timestamp which is stored in database.

Here is my config:

> input {  
> jdbc {  
> jdbc\_driver\_library =\> "/usr/share/logstash/libs/sqljdbc42.jar"  
> jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
> jdbc\_connection\_string =\> _"  
> jdbc\_user =\> "_"  
> jdbc\_password =\> "\*\*_"  
> statement =\> "select \* from log where timestamp \> :sql\_last\_value"  
> tracking\_column =\> "timestamp"  
> tracking\_column\_type =\> "timestamp"  
> clean\_run =\> true  
> schedule =\> "_/10 \* \* \* \* \*"  
> }  
> }   
> output {  
> elasticsearch {  
> hosts =\> "elasticsearch:9200"  
> }  
> stdout { codec =\> rubydebug }  
> }

It retrieve data but with the second query it not uses my timestamp. It uses something like Datetime now ?

 ![123](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6e4b52a691fe6a6ad095594fd055aac28b38e95e.png)

What iam doing wrong ? Or I just don't understand somethinh?

---

<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:** [October 10, 2017, 8:56am UTC](https://discuss.elastic.co/t/cannot-properly-assign-timestamp-tracking-column-value-jdbc-plugin/100177/2 "2017-10-10T08:56:26Z")

</div>

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