# Observability Engineer 5.1 - Ingest Pipeline

**URL:** <https://discuss.elastic.co/t/observability-engineer-5-1-ingest-pipeline/322103>\
**Category:** Elastic Training\
**Tags:** painless\
**Created:** [December 28, 2022, 2:29pm UTC](https://discuss.elastic.co/t/observability-engineer-5-1-ingest-pipeline/322103 "2022-12-28T14:29:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sl3vin](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sl3vin](https://discuss.elastic.co/u/sl3vin)\
**Post date:** [December 28, 2022, 2:29pm UTC](https://discuss.elastic.co/t/observability-engineer-5-1-ingest-pipeline/322103/1 "2022-12-28T14:29:57Z")

</div>

Hey,

I'm creating an ingest pipeline for the Elastic Observability Engineer lab with the following condition:

```auto
ctx.mysql.status.max_used_connections >= 10

```

This is the suggestion from the solution and is working fine.  
The video lesson on the other hand suggest another approach via `ctx['my-field']`. I assume the condition should be as following

```auto
ctx['mysql.status.max_used_connections'] >= 10

```

This is not working for me. Can anyone explain why? What am I getting wrong? The Painless Script documentation ([Script processor | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/script-processor.html#script-processor-access-source-fields)) is stating both as alternatives.

> To access these fields with a Painless script, use the [map access operator](https://www.elastic.co/guide/en/elasticsearch/painless/8.2/painless-operators-reference.html#map-access-operator): `ctx['my-field']`. You can also use the shorthand `ctx.<my-field>` syntax.

---

<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 27, 2023, 2:30pm UTC](https://discuss.elastic.co/t/observability-engineer-5-1-ingest-pipeline/322103/2 "2023-01-27T14:30:49Z")

</div>

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