Mutate (like logstash conf) using Python API

(Daniela Ruz) #1


I know that using logstash conf files you can perform operations like "mutate" so you can add fields to the mapping and then you can apply transformations to these fields. Something like this:

mutate {
    add_field => { "startDate" => "2017-04-01"}
  date {
    match => ["startDate", "yyyy-MM-dd"]
    target => "startDate"
    timezone => "UTC"

I have a file like this (it has thousands of documents):


And I want to add a date field. Is there a way to do the same thing using the Python API?

(system) #2

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