# Compare or script in example of watcher documentation

**URL:** <https://discuss.elastic.co/t/compare-or-script-in-example-of-watcher-documentation/24031>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [June 20, 2015, 5:57am UTC](https://discuss.elastic.co/t/compare-or-script-in-example-of-watcher-documentation/24031 "2015-06-20T05:57:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jettro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jettro/32/3418_2.png) [@jettro](https://discuss.elastic.co/u/jettro)\
**Post date:** [June 20, 2015, 5:57am UTC](https://discuss.elastic.co/t/compare-or-script-in-example-of-watcher-documentation/24031/1 "2015-06-20T05:57:08Z")

</div>

Hi, I am reading the documentation and learning a long the way. In the sample on the following page a script is used in the transformation. I think this example is the perfect example for a condition based approach. Wouldn't that be a better example for people learning about their first watchers?

[https://www.elastic.co/guide/en/watcher/current/watch-definition.html](https://www.elastic.co/guide/en/watcher/current/watch-definition.html)

---

<div class="post-metadata">

**Author:** ![uboness](https://avatars.discourse-cdn.com/v4/letter/u/96bed5/32.png) [@uboness](https://discuss.elastic.co/u/uboness)\
**Post date:** [June 20, 2015, 7:19pm UTC](https://discuss.elastic.co/t/compare-or-script-in-example-of-watcher-documentation/24031/2 "2015-06-20T19:19:19Z")

</div>

Hey Jettro,

So in the [getting started](https://www.elastic.co/guide/en/watcher/current/getting-started.html) pages, we indeed left out the transform (as you don't really always need it). The page you're referring to is not part of the getting started, but more of a deep dive in what makes a watch and transform is one of those constructs. So the example there is just to show how it fits in the "global" picture.. at least that's the rationale around it.

---

<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:49pm UTC](https://discuss.elastic.co/t/compare-or-script-in-example-of-watcher-documentation/24031/3 "2017-07-06T13:49:27Z")

</div>


