Create custom _id for events uploaded via file from data visualizer option in ML (Kibana)

Hi Team,

I have a simple csv file with 4 columns that I want to upload and push in ES. For that I am using the data visualizer option in ML (on Kibana). I click on import file, select the file, enter index name and done.
My issue is that I want to change and have a custom '_id' value (say 1st column from the csv file as '_id'), so that I can handle any duplicate data uploaded next time.
If I use logstash, I am aware I can use document_id in ES output, but how do I achieve the above while directly uploading the file from Kibana.

Any help would be appreciated.

On the "Advanced" tab of the file import page you can edit the ingest pipeline. Add something like this at the end of the processors array:

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

This should copy the value from your first column into _id. (Obviously replace my_first_column_name with whatever it is in your file.)

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