# Data extraction, Watcher - CSV export with relative time period

**URL:** <https://discuss.elastic.co/t/data-extraction-watcher-csv-export-with-relative-time-period/300287>\
**Category:** Kibana\
**Created:** [March 22, 2022, 7:54am UTC](https://discuss.elastic.co/t/data-extraction-watcher-csv-export-with-relative-time-period/300287 "2022-03-22T07:54:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AQ\_Amra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aq_amra/32/42976_2.png) [@AQ\_Amra](https://discuss.elastic.co/u/AQ_Amra)\
**Post date:** [March 22, 2022, 7:54am UTC](https://discuss.elastic.co/t/data-extraction-watcher-csv-export-with-relative-time-period/300287/1 "2022-03-22T07:54:42Z")

</div>

Hi,

I am attempting to extract a CSV of data from ES/Kibana every hour.

I've configured a watcher task which runs hourly, and emails a CSV file (based on the discover POST URL form here [Automatically generate reports | Kibana Guide [8.1] | Elastic](https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html))

However, the above doesn't provide me with a relative timestamp, i.e the data is always for the period when I created the saved Discover search.

Is it possible to use watcher with a relative time period? Or is there a different mechanism i should use to extract the data?

Additionally, is there a way to use watcher with aggregated data from a visualization? (as opposed to data from discover)

Many thanks in advance for the assistance.

Regards

---

<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:** [April 19, 2022, 7:54am UTC](https://discuss.elastic.co/t/data-extraction-watcher-csv-export-with-relative-time-period/300287/2 "2022-04-19T07:54:50Z")

</div>

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