# What is actually .logstash\_jdbc\_last\_run file?

**URL:** <https://discuss.elastic.co/t/what-is-actually-logstash-jdbc-last-run-file/64705>\
**Category:** Logstash\
**Created:** [November 2, 2016, 11:45am UTC](https://discuss.elastic.co/t/what-is-actually-logstash-jdbc-last-run-file/64705 "2016-11-02T11:45:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kulasangar\_Gowrisang](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@Kulasangar\_Gowrisang](https://discuss.elastic.co/u/Kulasangar_Gowrisang)\
**Post date:** [November 2, 2016, 11:45am UTC](https://discuss.elastic.co/t/what-is-actually-logstash-jdbc-last-run-file/64705/1 "2016-11-02T11:45:21Z")

</div>

I'm pretty confused what this file is and where does it get the `timestamp` which it has in it?

I'm aware that this get generated every time you run the `logstash` conf file. Is this file related by any chance with the database table which we mention within the `jdbc` tag?

Is it a must to have `last_run_metadata_path` which points to the `.logstash_jdbc_last_run` file within the logstash input (`jdbc`) tag every time I run the logstash conf file?

Any help could be appreciated.

---

<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:** [November 3, 2016, 6:41am UTC](https://discuss.elastic.co/t/what-is-actually-logstash-jdbc-last-run-file/64705/2 "2016-11-03T06:41:22Z")

</div>

The file contains the last seen value so that Logstash can ask for newer values the next time the jdbc input makes query. You only need to set `last_run_metadata_path` if you're unhappy with the default value.

---

<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 6, 2017, 4:31am UTC](https://discuss.elastic.co/t/what-is-actually-logstash-jdbc-last-run-file/64705/3 "2017-07-06T04:31:22Z")

</div>


