# Unable to access field outside \_source in Painless ingest processor

**URL:** <https://discuss.elastic.co/t/unable-to-access-field-outside-source-in-painless-ingest-processor/260247>\
**Category:** Elasticsearch\
**Tags:** painless, ingest-pipeline\
**Created:** [January 5, 2021, 5:14pm UTC](https://discuss.elastic.co/t/unable-to-access-field-outside-source-in-painless-ingest-processor/260247 "2021-01-05T17:14:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)\
**Post date:** [January 5, 2021, 5:14pm UTC](https://discuss.elastic.co/t/unable-to-access-field-outside-source-in-painless-ingest-processor/260247/1 "2021-01-05T17:14:57Z")

</div>

Hi I can not figure out how to access a field that is outside the \_source. The grok processor with the field nested I can't access, or the rename processor too. Tried to access the data with ctx, \_source, \_index. Don't know what to do.

```
POST /_ingest/pipeline/_simulate?verbose
{
  "pipeline" :
  {
    "description": "_description",
    "processors":[
  {
    "grok": {
      "field": "statusChangeHistory.L.M.changeRequestReceivedDate.S",
      "patterns": [
        "%{YEAR:ano}-%{MONTHNUM:mes}-%{MONTHDAY:dia}[T]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?%{ISO8601_TIMEZONE}"
      ],
      "ignore_missing": true,
      "ignore_failure": true
    }
  },
  {
    "rename": {
      "field": "_source.fields",
      "target_field": "field_xxx"
    }  
    
  }
  ]
  },
  "docs": [
    {
  "_index": "transaction_service",
  "_type": "_doc",
  "_id": "aut_e1c30967",
  
  "_score": null,
  "_source": {
    
    
    "statusChangeHistory": {
      
    }
  },
  "fields": {
    "statusChangeHistory.L.M.changeRequestReceivedDate.S": [
      "2021-01-05T13:48:34.496Z",
      "2021-01-05T13:49:06.000Z"
    ],
    "transactionDate.S": [
      "2021-01-05T03:00:00.000Z"
    ],
    "transactionReceivedDateTime.S": [
      "2021-01-05T13:48:34.496Z"
    ]
  },
  "sort": [
    1609854514496
  ]
}
  ]
}
```

---

<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:** [February 2, 2021, 5:14pm UTC](https://discuss.elastic.co/t/unable-to-access-field-outside-source-in-painless-ingest-processor/260247/2 "2021-02-02T17:14:57Z")

</div>

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