Skip to content

Date Processor

Karina-Bulatov edited this page Dec 15, 2022 · 13 revisions

Date [date]

This processor parses a date field and outputs the date to the "targetField" in a format that elasticsearch supports.

Date parsing should always have an existing targetField which is already mapped as a date or it should be a new field.

Sawmill PREBUILT date parsing FORMATS:

  • UNIX
  • UNIX_MS
  • ISO8601
  • ELASTIC

Example

{
  "steps": [
    {
      "date": {
        "config": {
          "field": "timestamp",
          "targetField": "@timestamp",
          "formats": [
            "ISO8601",
            "UNIX_MS"
          ]
        }
      }
    }
  ]
}
{
  "steps": [
    {
      "date": {
        "config": {
          "field": "timestamp",
          "targetField": "@timestamp",
          "timeZone": "Europe/Paris",
          "formats": [
            "MMMM dd.... yyyy hh:mm:ss a 'CEST'",
            "MMMM  d.... yyyy hh:mm:ss a 'CEST'",
            "MMMM d.... yyyy hh:mm:ss a 'CEST'"
          ]
        }
      }
    }
  ]
}
Clone this wiki locally