# How to craft a data transformation - use script?

**URL:** <https://discuss.elastic.co/t/how-to-craft-a-data-transformation-use-script/20942>\
**Category:** Elasticsearch\
**Created:** [November 25, 2014, 5:01pm UTC](https://discuss.elastic.co/t/how-to-craft-a-data-transformation-use-script/20942 "2014-11-25T17:01:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Ambler\_2](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@Christopher\_Ambler\_2](https://discuss.elastic.co/u/Christopher_Ambler_2)\
**Post date:** [November 25, 2014, 5:01pm UTC](https://discuss.elastic.co/t/how-to-craft-a-data-transformation-use-script/20942/1 "2014-11-25T17:01:18Z")

</div>

Pretty simple requirement:

Find all documents where the field "vendorid" has no value and give it a  
value of "6"

Would I do this with an update call and use script? I'm a little unclear  
how. Or is there a more canonical way to do something like this?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c4bf0d53-4cf8-4a58-934d-10e062a477ee%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c4bf0d53-4cf8-4a58-934d-10e062a477ee%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:47am UTC](https://discuss.elastic.co/t/how-to-craft-a-data-transformation-use-script/20942/2 "2017-07-06T00:47:42Z")

</div>

Closed on July 6, 2017, 12:47am UTC


