Home > Software design >  How to select _id field for documents as a CSV column while drag-n-dropping CSV file in elasticsearc
How to select _id field for documents as a CSV column while drag-n-dropping CSV file in elasticsearc

Time:04-19

I am trying to add data to elasticsearch by uploading a CSV file. I want to select _id for elastic documents as values from a CSV column. How can I do that?

I can do it using logstash but I want to know if I can do it in above case? Thanks!

CodePudding user response:

Once you import the file You can find the the "Advanced" tab of the file import page. Here you can edit the ingest pipeline. Add something like this at the end of the processors array, in my case the name of the column is "id"

{
  "set": {
    "field": "_id",
    "value": "{{id}}"
  }
}

have a look at the screenshot for your reference. enter image description here

  • Related