# Bulk renaming of fields in Kibana saved objects?

**URL:** <https://discuss.elastic.co/t/bulk-renaming-of-fields-in-kibana-saved-objects/270642>\
**Category:** Kibana\
**Created:** [April 20, 2021, 1:39am UTC](https://discuss.elastic.co/t/bulk-renaming-of-fields-in-kibana-saved-objects/270642 "2021-04-20T01:39:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GrahamHannington](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grahamhannington/32/4404_2.png) [@GrahamHannington](https://discuss.elastic.co/u/GrahamHannington)\
**Post date:** [April 20, 2021, 1:39am UTC](https://discuss.elastic.co/t/bulk-renaming-of-fields-in-kibana-saved-objects/270642/1 "2021-04-20T01:39:07Z")

</div>

I'm developing Kibana (7.11.2) dashboards based on JSON Lines data that is forwarded by a (proprietary) application that I'm also involved in developing.

I'm currently using the application to forward data with "compact" field (JSON key) names, such as `indecpup`. However, the application can also forward the same data values with longer, less-cryptic field names, such as `independent_enclave_cpu_percent`.

There are pros and cons to these different field names, but, especially for demonstration purposes, I will likely transition to using the longer field names.

The visualizations that I've created so far refer to the compact field names.

I'm considering how to automate migrating my existing Kibana saved objects (including several dozen visualizations/searches) to refer to the longer names. I'd welcome advice on how to do this.

Suppose that I have a table that maps between the compact and longer names.

It occurs to me that I could write a script (say, in Python) that searches an exported `.ndjson` file for:

\"field\":\"_compact-name_\"

and

\"fieldName\":\"_compact-name_\"

and replaces _compact-name_ with the corresponding _longer-name_.

I could export all saved objects, run my script on the exported `.ndjson` file, and then import the edited version.

I'd delete all existing Elasticsearch indexes containing data with the compact field names, and then ingest new data with the longer field names. (Right now, in development, I don't need to keep any old data with the compact field names.)

I'd need to refresh the corresponding index patterns, to "flush" the old field names and load the new field names. Er... how do I do that in Kibana 7.11.2, or later? I don't see a "Refresh" button when I select an index pattern under Stack Management \> Index patterns.

Is that it? Have I missed anything?

Is there an existing solution for doing this?

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [April 20, 2021, 7:17am UTC](https://discuss.elastic.co/t/bulk-renaming-of-fields-in-kibana-saved-objects/270642/2 "2021-04-20T07:17:08Z")

</div>

You're right, there is no way to 'reload' an index pattern.

However you could export the index pattern, rename the fields in the `fieldFormatMap` attribute, and then re-import then, the same way you're planning to do with your other objects.

---

<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 18, 2021, 7:17am UTC](https://discuss.elastic.co/t/bulk-renaming-of-fields-in-kibana-saved-objects/270642/3 "2021-05-18T07:17:23Z")

</div>

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