# Logstash not updating Data as schedule

**URL:** <https://discuss.elastic.co/t/logstash-not-updating-data-as-schedule/209462>\
**Category:** Logstash\
**Created:** [November 26, 2019, 10:04am UTC](https://discuss.elastic.co/t/logstash-not-updating-data-as-schedule/209462 "2019-11-26T10:04:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saifrehman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saifrehman/32/56971_2.png) [@saifrehman](https://discuss.elastic.co/u/saifrehman)\
**Post date:** [November 26, 2019, 10:04am UTC](https://discuss.elastic.co/t/logstash-not-updating-data-as-schedule/209462/1 "2019-11-26T10:04:08Z")

</div>

@magnusbaeck ,  
I m continuously migrating data from MySQL to elastic search through scheduling via logstash. Everything is working fine and data is indexed in ES. But when i update 4 to 5 records it will update 3 and remaing 2 are not updated in ES.  
Following is my configuration file.

```
> input{
> jdbc {
> jdbc_connection_string => "----"
> jdbc_user => "------"
> jdbc_password => "-----------"
> jdbc_validate_connection => true
> #jdbc_driver_library => "/home/ubuntu/mysql-connector-java-5.1.36-bin.jar"
> jdbc_driver_class => "com.mysql.jdbc.Driver"
> tracking_column => "updated_timestamp"
> tracking_column_type => "timestamp"
> use_column_value => true
> jdbc_default_timezone => "UTC"
> schedule => "* * * * * *"
> statement => "SELECT
> id as db_id,
> DATE_FORMAT(updated_timestamp, '%Y-%m-%d %T') as updated_timestamp,
> CONCAT('u','-', following_id) as user_id,
> created_at,
> CONCAT('fg','-', id) as id,
> CONCAT('u','-', follower_id) as object_id,
> id,
> status
> FROM
> friends
> WHERE
> updated_timestamp > :sql_last_value order by updated_timestamp DESC "
> last_run_metadata_path => "/home/ubuntu/logstash_track_date/.logstash_followings_jdbc_last_run"
> add_field => { "doctype" => "followings" }
> }
> }

```

Any help is much appreciated.

---

<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:** [December 24, 2019, 10:09am UTC](https://discuss.elastic.co/t/logstash-not-updating-data-as-schedule/209462/2 "2019-12-24T10:09:54Z")

</div>

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