# Export & import Scripted fields

**URL:** <https://discuss.elastic.co/t/export-import-scripted-fields/87753>\
**Category:** Kibana\
**Created:** [May 31, 2017, 1:47pm UTC](https://discuss.elastic.co/t/export-import-scripted-fields/87753 "2017-05-31T13:47:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![magerRV](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@magerRV](https://discuss.elastic.co/u/magerRV)\
**Post date:** [May 31, 2017, 1:47pm UTC](https://discuss.elastic.co/t/export-import-scripted-fields/87753/1 "2017-05-31T13:47:11Z")

</div>

I know Scripted Fields are stored as a String in the Index Pattern Objects.  
For sure I can just copy and paste it when I create a new one but it takes to much time or effort to do it that way.

Does anyone know a feature or a plugin or any other way to import and/or export the Scripted Fields?  
Kibana or Elastic safes them somehow somewhere but I dont know how to safe them somewhere else.  
In my job I creat a buch of them almost everyday. The possebility to save them external or to import them into a new index would be awesome.

Thanks for help

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [May 31, 2017, 6:25pm UTC](https://discuss.elastic.co/t/export-import-scripted-fields/87753/2 "2017-05-31T18:25:48Z")

</div>

There aren't any that I know of, but a script could be written to do it.  
Index patterns are stored in `.kibana/index-pattern/{your_index_pattern_id}`. Scripted fields are stored in the fields array, (along with all other fields).

I would try something like starting with one of the [elasticsearch clients](https://www.elastic.co/guide/en/elasticsearch/client/index.html), pull down the index pattern data, append any scripted fields to the fields array, and send an update back to elasticsearch

---

<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 28, 2017, 6:26pm UTC](https://discuss.elastic.co/t/export-import-scripted-fields/87753/3 "2017-06-28T18:26:01Z")

</div>

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