# Backwards update for transform data

**URL:** <https://discuss.elastic.co/t/backwards-update-for-transform-data/255668>\
**Category:** Elasticsearch\
**Tags:** transforms\
**Created:** [November 17, 2020, 10:54am UTC](https://discuss.elastic.co/t/backwards-update-for-transform-data/255668 "2020-11-17T10:54:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)\
**Post date:** [November 17, 2020, 10:54am UTC](https://discuss.elastic.co/t/backwards-update-for-transform-data/255668/1 "2020-11-17T10:54:44Z")

</div>

Hello

I wonder what's the best practices , in case of a failed transform (for example if a new index was created with wrong mapping or any reason), of completing the missing data.

example:  
created a new transform at 23:00  
which has the following group by: date histogram of 1 minute, and terms by server , and avg(load) aggregation

at 00 a new a new index was created with the wrong mapping: server should be a keyword, but its a text

the transform failed, and until it's fixed - 10am, data is missing from the dest index

what the recommended way of handling such a case? (can it be automated?)

thanks

---

<div class="post-metadata">

**Author:** ![Hendrik\_Muhs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendrik_muhs/32/25802_2.png) [@Hendrik\_Muhs](https://discuss.elastic.co/u/Hendrik_Muhs)\
**Post date:** [November 17, 2020, 11:45am UTC](https://discuss.elastic.co/t/backwards-update-for-transform-data/255668/2 "2020-11-17T11:45:45Z")

</div>

Transform uses checkpoints, because the transform has failed check pointing does not proceed but is stopped at the time it failed. Once you re-start the transform it will continue from the checkpoint.

To restart the transform you first need to bring it into the stopped state by using

POST \_transform/{id}/\_stop?force=true

Afterwards you can start it again.

There is no way to automate, because transform treats this error as permanent problem which requires a user to fix it. This is different to the case that a temporary problem occurs, e.g. temporary outage of the node that holds the data. If such a failure happens, transform retries up to 10 times.

---

<div class="post-metadata">

**Author:** ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)\
**Post date:** [November 17, 2020, 4:16pm UTC](https://discuss.elastic.co/t/backwards-update-for-transform-data/255668/3 "2020-11-17T16:16:24Z")

</div>

Thanks a lot. Can I also ask what's the best option for transform fail alert?

---

<div class="post-metadata">

**Author:** ![Hendrik\_Muhs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendrik_muhs/32/25802_2.png) [@Hendrik\_Muhs](https://discuss.elastic.co/u/Hendrik_Muhs)\
**Post date:** [November 17, 2020, 7:16pm UTC](https://discuss.elastic.co/t/backwards-update-for-transform-data/255668/4 "2020-11-17T19:16:21Z")

</div>

> [@liorg2](#):
>
> Can I also ask what's the best option for transform fail alert?

This is a good question. The best option right now is afaik using watcher and the [http input](https://www.elastic.co/guide/en/elasticsearch/reference/current/input-http.html).

I suggest to configure it against the `_transform/{transform_id}/_stats` endpoint and check that `status != failed`.

(Note its called http input but it can speak https)

I will follow up with the team if we can provide a better solution in future, e.g. a transform wide state. Feel free to open a gh issue as enhancement request if you have a concrete idea how it should look like.

---

<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 15, 2020, 7:16pm UTC](https://discuss.elastic.co/t/backwards-update-for-transform-data/255668/5 "2020-12-15T19:16:24Z")

</div>

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