# Export Index Template with Dynamic Fields

**URL:** <https://discuss.elastic.co/t/export-index-template-with-dynamic-fields/161938>\
**Category:** Beats\
**Created:** [December 23, 2018, 5:27am UTC](https://discuss.elastic.co/t/export-index-template-with-dynamic-fields/161938 "2018-12-23T05:27:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andre\_Baskin](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Andre\_Baskin](https://discuss.elastic.co/u/Andre_Baskin)\
**Post date:** [December 23, 2018, 5:27am UTC](https://discuss.elastic.co/t/export-index-template-with-dynamic-fields/161938/1 "2018-12-23T05:27:36Z")

</div>

I am working on a beat where the field names and types it returns are not known until run time. There is the option to use a custom index template so the user could build such an index template and add it to the beat config. However all the information to create an index template is available in the config file for the beat. Is it possible to modify the "export template" command to dynamically build the field list based on the current config file for the beat as opposed to pulling it from the static fields.yaml file?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [December 27, 2018, 1:59pm UTC](https://discuss.elastic.co/t/export-index-template-with-dynamic-fields/161938/2 "2018-12-27T13:59:10Z")

</div>

I think that's a good idea. Please open an [enhancement request](https://github.com/elastic/beats/issues/new/choose). Pull requests would be welcome as well 😉

---

<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:** [January 24, 2019, 3:59pm UTC](https://discuss.elastic.co/t/export-index-template-with-dynamic-fields/161938/3 "2019-01-24T15:59:11Z")

</div>

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