# How to rename a column name in the scriptfeild?

**URL:** <https://discuss.elastic.co/t/how-to-rename-a-column-name-in-the-scriptfeild/196745>\
**Category:** Kibana\
**Created:** [August 26, 2019, 10:10am UTC](https://discuss.elastic.co/t/how-to-rename-a-column-name-in-the-scriptfeild/196745 "2019-08-26T10:10:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dharani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dharani/32/46087_2.png) [@dharani](https://discuss.elastic.co/u/dharani)\
**Post date:** [August 26, 2019, 10:10am UTC](https://discuss.elastic.co/t/how-to-rename-a-column-name-in-the-scriptfeild/196745/1 "2019-08-26T10:10:39Z")

</div>

Hello Team,

how to rename a column using scripted field in kibana.  
if possible need a solution or alternate solution for this.

Thanks.  
Dharani

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [August 26, 2019, 10:57am UTC](https://discuss.elastic.co/t/how-to-rename-a-column-name-in-the-scriptfeild/196745/2 "2019-08-26T10:57:42Z")

</div>

Hi,  
you can add a new field with a different name using scripted fields, but not altering any existing field name with scripted fields.

If it's ok to rename it, just create a new scripted field, with the same type as the existing one and configure the painless script to return the original field like `doc['user.keyword']` for example

---

<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:** [September 23, 2019, 10:57am UTC](https://discuss.elastic.co/t/how-to-rename-a-column-name-in-the-scriptfeild/196745/3 "2019-09-23T10:57:44Z")

</div>

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