# Transform Preview fails with "Please provide a transform \[id\] or the config object"

**URL:** <https://discuss.elastic.co/t/transform-preview-fails-with-please-provide-a-transform-id-or-the-config-object/350730>\
**Category:** Elasticsearch\
**Tags:** transforms\
**Created:** [January 10, 2024, 10:27am UTC](https://discuss.elastic.co/t/transform-preview-fails-with-please-provide-a-transform-id-or-the-config-object/350730 "2024-01-10T10:27:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nightingale\_John](https://avatars.discourse-cdn.com/v4/letter/n/ecccb3/32.png) [@Nightingale\_John](https://discuss.elastic.co/u/Nightingale_John)\
**Post date:** [January 10, 2024, 10:27am UTC](https://discuss.elastic.co/t/transform-preview-fails-with-please-provide-a-transform-id-or-the-config-object/350730/1 "2024-01-10T10:27:23Z")

</div>

Hi All,

I'm trying to get a transform working, my first one admittedly, but regardless of whether I do API or via browser setup it errors. An example transform preview:

```auto
POST _transform/_preview
{
  "source": {
    "index": "logs-*"
  },
  "pivot": {
    "group_by": {
      "customer": {
        "terms": {
          "field": "customer"
        }
      }
    },
    "aggregations": {
      "module": {
        "value_count": {
          "field": "event.module"
        }
      }
    }
  }
}

```

The error:

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "status_exception",
        "reason" : "Please provide a transform [id] or the config object"
      }
    ],
    "type" : "status_exception",
    "reason" : "Please provide a transform [id] or the config object"
  },
  "status" : 400
}

```

No matter what I try and do with a transform it comes out with the same error.. I believe i've got the coding right.. but i'm stuck. Any help greatly appreciated.

J

---

<div class="post-metadata">

**Author:** ![darnautov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darnautov/32/70608_2.png) [@darnautov](https://discuss.elastic.co/u/darnautov)\
**Post date:** [January 10, 2024, 10:42am UTC](https://discuss.elastic.co/t/transform-preview-fails-with-please-provide-a-transform-id-or-the-config-object/350730/2 "2024-01-10T10:42:28Z")

</div>

Hi @Nightingale_John,

To clarify, do you use Dev Tools to run this request? The payload seems valid, but apparently the `_preview` endpoint doesn't receive a config object, hence the error.

---

<div class="post-metadata">

**Author:** ![darnautov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darnautov/32/70608_2.png) [@darnautov](https://discuss.elastic.co/u/darnautov)\
**Post date:** [January 10, 2024, 10:44am UTC](https://discuss.elastic.co/t/transform-preview-fails-with-please-provide-a-transform-id-or-the-config-object/350730/3 "2024-01-10T10:44:31Z")

</div>

Please make sure you don't have a space after this line. If there is a line-break, payload isn't passed with the request and you get the error you mentioned.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/1/3170033d495b59921ed5dd85744e3affac47d571.png)

---

<div class="post-metadata">

**Author:** ![Nightingale\_John](https://avatars.discourse-cdn.com/v4/letter/n/ecccb3/32.png) [@Nightingale\_John](https://discuss.elastic.co/u/Nightingale_John)\
**Post date:** [January 10, 2024, 10:59am UTC](https://discuss.elastic.co/t/transform-preview-fails-with-please-provide-a-transform-id-or-the-config-object/350730/4 "2024-01-10T10:59:33Z")

</div>

Hey Dima

Yes I'm using dev tools, no space either.. it's quite odd. The same issue when I use the transforms page to setup via the browser.

I'll try curl and see what happens.

J

---

<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 7, 2024, 11:00am UTC](https://discuss.elastic.co/t/transform-preview-fails-with-please-provide-a-transform-id-or-the-config-object/350730/5 "2024-02-07T11:00:11Z")

</div>

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