# Unable to create a transform that uses "min"

**URL:** https://discuss.elastic.co/t/unable-to-create-a-transform-that-uses-min/271309
**Category:** Kibana
**Created:** [April 27, 2021, 2:30am UTC](https://discuss.elastic.co/t/unable-to-create-a-transform-that-uses-min/271309 "2021-04-27T02:30:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sam\_Critchley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sam_critchley/32/80579_2.png) [@Sam\_Critchley](https://discuss.elastic.co/u/Sam_Critchley)
#### Post date: [April 27, 2021, 2:30am UTC](https://discuss.elastic.co/t/unable-to-create-a-transform-that-uses-min/271309/1 "2021-04-27T02:30:54Z")

</div>

I'm trying to create a transform that aggregates on min of a date field. This field is mapped in the index like so:

```auto
"event_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss.nnnnnn"
        },

```

Its value is not 8601 compliant. When I try and use this in a transform everything looks ok and I can see a preview of my data. But when I run it it fails with

> Failed to index documents into destination index due to permanent error: [BulkIndexingException[Bulk index experienced [500] failures and at least 1 irrecoverable [TransformException[Destination index mappings are incompatible with the transform configuration.]; nested: MapperParsingException[failed to parse field [event\_time.min] of type [date] in document with id 'MNmjKZLf5Er5fYejFHLyAkoAAAAAAAAA'. Preview of field's value: '2020-04-01 16:01:53.000000']; nested: IllegalArgumentException[failed to parse date field [2020-04-01 16:01:53.000000] with format [strict\_date\_optional\_time||epoch\_millis]]; nested: NotSerializableExceptionWrapper[date\_time\_parse\_exception: Failed to parse with all enclosed parsers];; MapperParsingException[failed to parse field [event\_time.min] of type [date] in document with id 'MNmjKZLf5Er5fYejFHLyAkoAAAAAAAAA'. Preview of field's value: '2020-04-01 16:01:53.000000']; nested: IllegalArgumentException[failed to parse date field [2020-04-01 16:01:53.000000] with format [strict\_date\_optional\_time||epoch\_millis]]; nested: NotSerializableExceptionWrapper[date\_time\_parse\_exception: Failed to parse with all enclosed parsers];; java.lang.IllegalArgumentException: failed to parse date field [2020-04-01 16:01:53.000000] with format [strict\_date\_optional\_time||epoch\_millis]]. Other failures: ]; nested: TransformException[Destination index mappings are incompatible with the transform

...and on it goes.

The formatting hint doesn't seem to carry over from the source column.

---

<div class="post-metadata">

### Author: ![Sam\_Critchley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sam_critchley/32/80579_2.png) [@Sam\_Critchley](https://discuss.elastic.co/u/Sam_Critchley)
#### Post date: [April 27, 2021, 3:12am UTC](https://discuss.elastic.co/t/unable-to-create-a-transform-that-uses-min/271309/2 "2021-04-27T03:12:00Z")

</div>

The fix appears to be to specify a mapping in the index for the aggregate. So no event\_time but event\_time.min.

```auto
"properties": {
            "event_time.min": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss.nnnnnn"
            }
        }

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 25, 2021, 3:12am UTC](https://discuss.elastic.co/t/unable-to-create-a-transform-that-uses-min/271309/3 "2021-05-25T03:12:52Z")

</div>

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