# Pig Connector: UPSERT requirement

**URL:** https://discuss.elastic.co/t/pig-connector-upsert-requirement/29023
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [September 10, 2015, 12:09pm UTC](https://discuss.elastic.co/t/pig-connector-upsert-requirement/29023 "2015-09-10T12:09:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ayan\_guha](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@ayan\_guha](https://discuss.elastic.co/u/ayan_guha)
#### Post date: [September 10, 2015, 12:09pm UTC](https://discuss.elastic.co/t/pig-connector-upsert-requirement/29023/1 "2015-09-10T12:09:10Z")

</div>

Hi Forum

I am trying to do an upsert operation. My requirement is to update a document partially using Pig Latin. I saw ex.update.script params but could not understand how to use them. Any example would be great. Also,is there any other way? Any help much appreciated...

---

<div class="post-metadata">

### Author: ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)
#### Post date: [September 10, 2015, 1:11pm UTC](https://discuss.elastic.co/t/pig-connector-upsert-requirement/29023/2 "2015-09-10T13:11:00Z")

</div>

Take a look at the Elasticsearch reference documentation, in particular the [update](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html) section.

---

<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, 1:27pm UTC](https://discuss.elastic.co/t/pig-connector-upsert-requirement/29023/3 "2017-07-06T13:27:32Z")

</div>


