# Granulated data - elasticsearch. Is it possible to convert minutely data to hourly data and store it as a new index?

**URL:** <https://discuss.elastic.co/t/granulated-data-elasticsearch-is-it-possible-to-convert-minutely-data-to-hourly-data-and-store-it-as-a-new-index/95742>\
**Category:** Elasticsearch\
**Created:** [August 3, 2017, 3:24pm UTC](https://discuss.elastic.co/t/granulated-data-elasticsearch-is-it-possible-to-convert-minutely-data-to-hourly-data-and-store-it-as-a-new-index/95742 "2017-08-03T15:24:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahdev](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@ahdev](https://discuss.elastic.co/u/ahdev)\
**Post date:** [August 3, 2017, 3:24pm UTC](https://discuss.elastic.co/t/granulated-data-elasticsearch-is-it-possible-to-convert-minutely-data-to-hourly-data-and-store-it-as-a-new-index/95742/1 "2017-08-03T15:24:59Z")

</div>

For storage purposes, I have to convert minutely data to hourly data, store it as an index. Likewise, after a week, convert the hourly data to weekly data. Is it possible to do it with ELK?

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [August 3, 2017, 8:04pm UTC](https://discuss.elastic.co/t/granulated-data-elasticsearch-is-it-possible-to-convert-minutely-data-to-hourly-data-and-store-it-as-a-new-index/95742/2 "2017-08-03T20:04:53Z")

</div>

Technically it's possible, although we don't have any automated features to do it right now.

Essentially, you'll have to setup a cron job (or similar) that periodically executes an aggregation to collected the rollup summaries, then index those back into Elasticsearch. You could potentially use Watcher to do this instead of a cron-job, but the process is essentially the same.

After indexing the summaries you could do something like a Delete-by-query to remove the old documents, or perhaps just delete the source index when done.

We'd been exploring how to do automatic rollups internally in Elasticsearch, but right now it's all just internal experimentation. Someday maybe! 🙂

---

<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 31, 2017, 8:05pm UTC](https://discuss.elastic.co/t/granulated-data-elasticsearch-is-it-possible-to-convert-minutely-data-to-hourly-data-and-store-it-as-a-new-index/95742/3 "2017-08-31T20:05:02Z")

</div>

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