# Last\_run\_metadata\_path not updating

**URL:** <https://discuss.elastic.co/t/last-run-metadata-path-not-updating/139596>\
**Category:** Logstash\
**Created:** [July 11, 2018, 2:32pm UTC](https://discuss.elastic.co/t/last-run-metadata-path-not-updating/139596 "2018-07-11T14:32:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunil\_Khullar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunil_khullar/32/50427_2.png) [@Sunil\_Khullar](https://discuss.elastic.co/u/Sunil_Khullar)\
**Post date:** [July 11, 2018, 2:32pm UTC](https://discuss.elastic.co/t/last-run-metadata-path-not-updating/139596/1 "2018-07-11T14:32:07Z")

</div>

First day with logstash (so excuse stupid posts)  
(using version 6.2.3 on Windows server)

Importing from Mysql - facing 2 issues

1. last\_run\_metadata\_path not updating , remains 0 after every query (though the file timestamp is updated - the file is being updated every minute, only value is not)
2. The number of records written in ES is 95 instead of 100 which are fetched.

below is the config

* * *

schedule =\> "\* \* \* \* \*"

```
statement => "select * from tbl_activity_log where time > '2018-06-01' and time > :sql_last_value order by time asc limit 100"

	use_column_value => true
	tracking_column => "time"
	tracking_column_type => "numeric"
	clean_run => true 
	last_run_metadata_path => "d:\es\.logstash_jdbc_last_run"
}

```

}

output {  
elasticsearch  
{  
hosts =\> "[http://192.168.15.24:9200](http://192.168.15.24:9200)"  
index =\> "th\_ar\_since\_jun\_2018"  
document\_id =\> "%{time}"  
}  
stdout {}  
}

---

<div class="post-metadata">

**Author:** ![Gokul\_15](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@Gokul\_15](https://discuss.elastic.co/u/Gokul_15)\
**Post date:** [July 11, 2018, 4:03pm UTC](https://discuss.elastic.co/t/last-run-metadata-path-not-updating/139596/2 "2018-07-11T16:03:06Z")

</div>

delete that and add new file,and make path  
eg:last\_run\_metadata\_path =\> "d:\es\new file"

---

<div class="post-metadata">

**Author:** ![Sunil\_Khullar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunil_khullar/32/50427_2.png) [@Sunil\_Khullar](https://discuss.elastic.co/u/Sunil_Khullar)\
**Post date:** [July 11, 2018, 4:06pm UTC](https://discuss.elastic.co/t/last-run-metadata-path-not-updating/139596/3 "2018-07-11T16:06:21Z")

</div>

I have deleted the file before every iteration.  
No luck.

---

<div class="post-metadata">

**Author:** ![Sunil\_Khullar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunil_khullar/32/50427_2.png) [@Sunil\_Khullar](https://discuss.elastic.co/u/Sunil_Khullar)\
**Post date:** [July 12, 2018, 7:28am UTC](https://discuss.elastic.co/t/last-run-metadata-path-not-updating/139596/4 "2018-07-12T07:28:16Z")

</div>

OK now created a new file for meta. Still value remains 0.

---

<div class="post-metadata">

**Author:** ![Sunil\_Khullar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunil_khullar/32/50427_2.png) [@Sunil\_Khullar](https://discuss.elastic.co/u/Sunil_Khullar)\
**Post date:** [July 12, 2018, 8:57am UTC](https://discuss.elastic.co/t/last-run-metadata-path-not-updating/139596/5 "2018-07-12T08:57:18Z")

</div>

Solved.  
tracking\_column\_type =\> "numeric"  
Time filed should not be numeric!

---

<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 9, 2018, 8:57am UTC](https://discuss.elastic.co/t/last-run-metadata-path-not-updating/139596/6 "2018-08-09T08:57:18Z")

</div>

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