# Error Field \[data\] not present as part of path \[data\]

**URL:** <https://discuss.elastic.co/t/error-field-data-not-present-as-part-of-path-data/300642>\
**Category:** Elasticsearch\
**Created:** [March 24, 2022, 9:01pm UTC](https://discuss.elastic.co/t/error-field-data-not-present-as-part-of-path-data/300642 "2022-03-24T21:01:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enxiad](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@Enxiad](https://discuss.elastic.co/u/Enxiad)\
**Post date:** [March 24, 2022, 9:01pm UTC](https://discuss.elastic.co/t/error-field-data-not-present-as-part-of-path-data/300642/1 "2022-03-24T21:01:05Z")

</div>

(Redacted for improved clarity, please see next post on this thread)

---

<div class="post-metadata">

**Author:** ![Enxiad](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@Enxiad](https://discuss.elastic.co/u/Enxiad)\
**Post date:** [March 25, 2022, 12:52am UTC](https://discuss.elastic.co/t/error-field-data-not-present-as-part-of-path-data/300642/2 "2022-03-25T00:52:31Z")

</div>

I got the error: _field [data] not present as part of path [data]_ when I attempt to ingest an attachment encoded in CBOR.

I have a text file (alpha.txt) with the content "The quick brown fox jumps over a lazy dog" (no quotes). Encoded in CBOR I obtain

```auto
x)The quick brown fox jumps over a lazy dog

```

## Console CURL commands, are as follows,

Create the index

```auto
PUT "localhost:9200/abcd1234?pretty" -H 'Content-Type: application/json' -d'
{
  "settings": {
    "index": {
      "number_of_shards": 1,  
      "number_of_replicas": 0 
    }
  }
}'

```

* * *

Create the CBOR attachment ingest pipeline

```auto
curl -X PUT "localhost:9200/_ingest/pipeline/cbor-attachment?pretty" -H 'Content-Type: application/json' -d'
{
  "description" : "Extract attachment information encoded in CBOR",
  "processors" : [
    {
      "attachment": {
        "description" : "Ingest attachment",
        "field": "data",
        "indexed_chars": -1
      }
    },
    {
      "set" : {
        "description" : "Add last updated time",
        "field": "last_update_time",
        "value": "{{_ingest.timestamp}}"
      }
    }
  ]
}'

```

* * *

Ingest the text document

```auto
PUT "localhost:9200/abcd1234/_doc/alpha?pipeline=cbor-attachment" -H 'Content-Type: application/cbor' -d'
{
  "data": "x)The quick brown fox jumps over a lazy dog"
}'

```

---

<div class="post-metadata">

**Author:** ![Enxiad](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@Enxiad](https://discuss.elastic.co/u/Enxiad)\
**Post date:** [March 25, 2022, 12:41pm UTC](https://discuss.elastic.co/t/error-field-data-not-present-as-part-of-path-data/300642/3 "2022-03-25T12:41:01Z")

</div>

Hi all. I’m new on this forum and I have searched docs but I can’t find help on this error anywhere. Any hints at all?

What do I need to do to make my question more clear?

English is not my first language, I apologize if that’s why nobody is replying.

---

<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:** [April 22, 2022, 12:41pm UTC](https://discuss.elastic.co/t/error-field-data-not-present-as-part-of-path-data/300642/4 "2022-04-22T12:41:43Z")

</div>

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