# Do transforms support Scripted fields?

**URL:** <https://discuss.elastic.co/t/do-transforms-support-scripted-fields/229350>\
**Category:** Kibana\
**Created:** [April 22, 2020, 8:46pm UTC](https://discuss.elastic.co/t/do-transforms-support-scripted-fields/229350 "2020-04-22T20:46:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Duncan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_duncan/32/46467_2.png) [@Mark\_Duncan](https://discuss.elastic.co/u/Mark_Duncan)\
**Post date:** [April 22, 2020, 8:46pm UTC](https://discuss.elastic.co/t/do-transforms-support-scripted-fields/229350/1 "2020-04-22T20:46:36Z")

</div>

I've started playing with transforms - which look very useful.

However, I cannot immediately see that they actually support scripted fields (which I define against a Kibana index). I am trying to sum a couple of them, but values being output simply equal 0 which is not what I expect to see.

Thanks in advance,  
Mark

---

<div class="post-metadata">

**Author:** ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)\
**Post date:** [April 22, 2020, 10:43pm UTC](https://discuss.elastic.co/t/do-transforms-support-scripted-fields/229350/2 "2020-04-22T22:43:42Z")

</div>

Transform Jobs support the aggregations and metrics specified in [the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/put-transform.html#put-transform-request-body).

I didn't check in the latest version, but I think you will have to replicate the scripted fields you need in the metrics as shown [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-sum-aggregation.html#_script_11).

---

<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:** [April 24, 2020, 5:48am UTC](https://discuss.elastic.co/t/do-transforms-support-scripted-fields/229350/3 "2020-04-24T05:48:03Z")

</div>

Some addition: scripts in the `aggregations` part shall be supported if the aggregation itself is supported. Scripting in the `group_by` part - to customize bucketing - will be supported starting with `7.7`, an example can be found in the [PR](https://github.com/elastic/elasticsearch/pull/53167).

---

<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:** [May 22, 2020, 5:48am UTC](https://discuss.elastic.co/t/do-transforms-support-scripted-fields/229350/4 "2020-05-22T05:48:06Z")

</div>

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