# Declaring runtime fields when creating transforms

**URL:** <https://discuss.elastic.co/t/declaring-runtime-fields-when-creating-transforms/305169>\
**Category:** Kibana\
**Tags:** transforms, runtime-fields\
**Created:** [May 19, 2022, 10:41am UTC](https://discuss.elastic.co/t/declaring-runtime-fields-when-creating-transforms/305169 "2022-05-19T10:41:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silver137](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Silver137](https://discuss.elastic.co/u/Silver137)\
**Post date:** [May 19, 2022, 10:41am UTC](https://discuss.elastic.co/t/declaring-runtime-fields-when-creating-transforms/305169/1 "2022-05-19T10:41:35Z")

</div>

I would like to add runtime fields against the index that is created when creating a transformation.  
I saw that the kibana transform gui offers a text box to work with runtime fields but not sure about how it works.

![imagen](https://us1.discourse-cdn.com/elastic/original/3X/b/0/b0cb8f8b63d82f7942d08a9c98af001f4c4c9864.png)

Should i create a index template for this purpose?  
Regards

---

<div class="post-metadata">

**Author:** ![James\_Gowdy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_gowdy/32/74175_2.png) [@James\_Gowdy](https://discuss.elastic.co/u/James_Gowdy)\
**Post date:** [May 19, 2022, 11:38am UTC](https://discuss.elastic.co/t/declaring-runtime-fields-when-creating-transforms/305169/2 "2022-05-19T11:38:13Z")

</div>

Runtime fields can be added to either the Data View in kibana or to the index in Elasticsearch via the API after the transform index has been created.

In Kibana the field can be added in the Data Views page, in the Stack Management section  
This will only exist in kibana and can be used for all dashboards, visualisations etc.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/0/d07487cc487cf5fe78350fe37950cef9808e048e.png)

Otherwise using the API you can add the runtime field to the index.

> **[Map a runtime field | Elasticsearch Guide \[8.2\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-mapping-fields.html)**

---

<div class="post-metadata">

**Author:** ![Silver137](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Silver137](https://discuss.elastic.co/u/Silver137)\
**Post date:** [May 19, 2022, 11:51am UTC](https://discuss.elastic.co/t/declaring-runtime-fields-when-creating-transforms/305169/3 "2022-05-19T11:51:14Z")

</div>

Amazing !!

---

<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:** [June 16, 2022, 11:51am UTC](https://discuss.elastic.co/t/declaring-runtime-fields-when-creating-transforms/305169/4 "2022-06-16T11:51:32Z")

</div>

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