# Return just some fields using Transform

**URL:** <https://discuss.elastic.co/t/return-just-some-fields-using-transform/350887>\
**Category:** Elasticsearch\
**Tags:** transforms\
**Created:** [January 11, 2024, 7:44pm UTC](https://discuss.elastic.co/t/return-just-some-fields-using-transform/350887 "2024-01-11T19:44:18Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 12, 2024, 2:31pm UTC](https://discuss.elastic.co/t/return-just-some-fields-using-transform/350887/5 "2024-01-12T14:31:20Z")

</div>

> [@jcruz](#):
>
> I got some errors while trying to remove the entire \_source and the entire fields, after copy the necessary fields to a new\_custom\_field.

Do not remove the `_source` as this will lead to many issues, for example without the `_source` Kibana does not work correctly for your index and you cannot even see the data on it, so you need to keep the `_source`.

Unfortunatelly there is no `prune` processor where you can specify just some fields to be stored, on this similar [post](https://discuss.elastic.co/t/implement-the-prune-filter-using-painless-script-in-ingest-pipeline/218619/2) someone implemented the prune filter using painless, that could be used in an ingest pipeline, but as mentioned this can be resource intensive.

The easiest solution is to namely specify all the fields you want to remove.

---

_[View the full topic](https://discuss.elastic.co/t/return-just-some-fields-using-transform/350887)._
