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

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:

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

The error:

{
  "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

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.

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.

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

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