# How to convert transformed index pattern from keyword/string-\>long?

**URL:** <https://discuss.elastic.co/t/how-to-convert-transformed-index-pattern-from-keyword-string-long/295985>\
**Category:** Elasticsearch\
**Created:** [February 1, 2022, 6:49pm UTC](https://discuss.elastic.co/t/how-to-convert-transformed-index-pattern-from-keyword-string-long/295985 "2022-02-01T18:49:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MLsuper](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@MLsuper](https://discuss.elastic.co/u/MLsuper)\
**Post date:** [February 1, 2022, 6:49pm UTC](https://discuss.elastic.co/t/how-to-convert-transformed-index-pattern-from-keyword-string-long/295985/1 "2022-02-01T18:49:33Z")

</div>

I'm trying to convert a field that is a keyword to a long but I cannot edit it, it is fixed in the transform index.

So I tried to use a ingest node pipeline which use convert keyword to long but how do I use that ingest node pipeline to my transform index?

For example the original index pattern has type like this:

time type: text,long  
time.keyword type: keyword

then when I transform the index I dont have the option to make it a a time.long or long so it has to be a keyword, then in the transform index pattern I cannot change it to a long

Is there a way to change it to a long or a number?

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [February 2, 2022, 3:15am UTC](https://discuss.elastic.co/t/how-to-convert-transformed-index-pattern-from-keyword-string-long/295985/2 "2022-02-02T03:15:05Z")

</div>

You can set the settings and mappings of the desitnation index beforehand.  
Below is the description about destination index parameter of transform API.

> `index`
> 
> (Required, string) The _destination index_ for the transform. The mappings of the destination index are deduced based on the source fields when possible. If alternate mappings are required, use the [Create index API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html) prior to starting the transform.
> 
> [Create transform API | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html)

---

<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:** [March 2, 2022, 3:15am UTC](https://discuss.elastic.co/t/how-to-convert-transformed-index-pattern-from-keyword-string-long/295985/3 "2022-03-02T03:15:29Z")

</div>

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