# Why we can not edit transform after creating

**URL:** <https://discuss.elastic.co/t/why-we-can-not-edit-transform-after-creating/289764>\
**Category:** Elasticsearch\
**Tags:** transforms\
**Created:** [November 21, 2021, 3:15pm UTC](https://discuss.elastic.co/t/why-we-can-not-edit-transform-after-creating/289764 "2021-11-21T15:15:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lstoneir](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@lstoneir](https://discuss.elastic.co/u/lstoneir)\
**Post date:** [November 21, 2021, 3:15pm UTC](https://discuss.elastic.co/t/why-we-can-not-edit-transform-after-creating/289764/1 "2021-11-21T15:15:29Z")

</div>

Hi every body!  
I want to edit transform jobs after creation,  
but according to the Elasticsearch documents, we can edit only some restricted fields.

is there a way to edit trasnform scripts? like group by section? or aggregation section?

thanks a lot,  
best regards

---

<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 22, 2021, 7:12am UTC](https://discuss.elastic.co/t/why-we-can-not-edit-transform-after-creating/289764/2 "2021-11-22T07:12:27Z")

</div>

That's not possible, because the group\_by fields are used to create the document id's. This _must_ be deterministic, because otherwise transform would not be able to update existing documents. The result would e.g. duplicated docs.

We could however relax this restriction for the aggregation section in future. If you use a script in the aggregation part you can use named scripts and change the script later.

What's the reason not to clone the transform instead? If you change essential parts like the group\_by, it is conceptually a different transform.

---

<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 20, 2021, 7:13am UTC](https://discuss.elastic.co/t/why-we-can-not-edit-transform-after-creating/289764/3 "2021-12-20T07:13:19Z")

</div>

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