# Elasticsearch Transform Document ID

**URL:** <https://discuss.elastic.co/t/elasticsearch-transform-document-id/256192>\
**Category:** Elasticsearch\
**Tags:** transforms\
**Created:** [November 20, 2020, 10:08pm UTC](https://discuss.elastic.co/t/elasticsearch-transform-document-id/256192 "2020-11-20T22:08:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaijun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaijun/32/78396_2.png) [@kaijun](https://discuss.elastic.co/u/kaijun)\
**Post date:** [November 20, 2020, 10:08pm UTC](https://discuss.elastic.co/t/elasticsearch-transform-document-id/256192/1 "2020-11-20T22:08:34Z")

</div>

When we use the transform API to transform our data into a new index, is there a way for us to set the document ID? (I think currently the default setting is randomly assigned some string as the document ID)

---

<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 23, 2020, 9:40am UTC](https://discuss.elastic.co/t/elasticsearch-transform-document-id/256192/2 "2020-11-23T09:40:46Z")

</div>

No, the document id can not be set as its important for the correct behavior when running in continuous mode. That's why the id is _not random_ but deterministic.

TL/DR: In continuous mode transform needs to overwrite old documents with the new version. The same document id must be used, otherwise the destination would contain duplicates / different versions of the same pivoted entry.

If you run in batch mode and desperately need your own document id's, you could change them using an ingest pipeline. However, note that this is an unsupported feature.

---

<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 21, 2020, 9:40am UTC](https://discuss.elastic.co/t/elasticsearch-transform-document-id/256192/3 "2020-12-21T09:40:48Z")

</div>

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