# Transforms on data older than a specific timestamp: checkpoints are not created

**URL:** https://discuss.elastic.co/t/transforms-on-data-older-than-a-specific-timestamp-checkpoints-are-not-created/296483
**Category:** Elasticsearch
**Tags:** transforms
**Created:** [February 7, 2022, 2:26pm UTC](https://discuss.elastic.co/t/transforms-on-data-older-than-a-specific-timestamp-checkpoints-are-not-created/296483 "2022-02-07T14:26:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![paulov](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@paulov](https://discuss.elastic.co/u/paulov)
#### Post date: [February 7, 2022, 2:26pm UTC](https://discuss.elastic.co/t/transforms-on-data-older-than-a-specific-timestamp-checkpoints-are-not-created/296483/1 "2022-02-07T14:26:31Z")

</div>

Continuing the discussion from [ES Continuous Transforms Checkpoint not updating](https://discuss.elastic.co/t/es-continuous-transforms-checkpoint-not-updating/265421):

Hi,  
I'm creating a transform job that transforms data in an index and takes all documents OLDER THAN 6 days (calculating averages etc).  
When I run the job I notice that only one checkpoint is created and no more.  
I have configured continuous mode, a @timestamp field and a 60sec delay value.

However, each 60 seconds a query for data older than 6 days will result in new data (with timestamp of 6days-60seconds ago to 6days ago) so I expect a new checkpoint for this data to be created.  
This does not happen. Why? I see in the transform statistics

```auto
      "checkpointing" : {
        "last" : {
          "checkpoint" : 1,
          "timestamp_millis" : 1644238548355,
          "time_upper_bound_millis" : 1644238440000
        },
        "operations_behind" : 12850,
        "changes_last_detected_at" : 1644238548355
      }

```

that 12850 documents more are processed but are apparently not checkpointed.

Is there an explanation for this? Is transform only designed for examining documents NEWER than a specific timestamp?

---

<div class="post-metadata">

### Author: ![Hendrik\_Muhs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendrik_muhs/32/25802_2.png) [@Hendrik\_Muhs](https://discuss.elastic.co/u/Hendrik_Muhs)
#### Post date: [February 8, 2022, 7:39am UTC](https://discuss.elastic.co/t/transforms-on-data-older-than-a-specific-timestamp-checkpoints-are-not-created/296483/2 "2022-02-08T07:39:21Z")

</div>

Continuous mode is configured on a date field. The timestamp of that field is used for checkpointing. In your example `time_upper_bound_millis = 1644238440000` - which translates to `02/08/2022 @ 7:24am` in UTC is the time upper bound of the checkpoint. If you push data _before_ that time transform is not able to query for this data. That's by design.

Note the difference between `timestamp_millis` and `time_upper_bound_millis`. `time_upper_bound_millis` is calculating taking the system time, deducting `delay`. In this case the value is additionally rounded down to a bucket boundary, because you use a `date_histogram` in your transform configuration.

To workaround your problem you have 2 options:

- increase `delay`: if you increase `delay` to e.g. `6d` transform won't miss any data that arrives `now - 6d`, however it also won't process any data in between.
- use an [ingest timestamp](https://discuss.elastic.co/t/dec-12th-2018-en-elasticsearch-automatically-adding-a-timestamp-to-documents/159314) for sync: If you add another timestamp field in your source data which contains the date when the data has been ingested/indexed in Elasticsearch you can configure `sync` to use the ingest timestamp while you can still `pivot` on another timestamp field.

---

<div class="post-metadata">

### Author: ![paulov](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@paulov](https://discuss.elastic.co/u/paulov)
#### Post date: [February 8, 2022, 10:29am UTC](https://discuss.elastic.co/t/transforms-on-data-older-than-a-specific-timestamp-checkpoints-are-not-created/296483/3 "2022-02-08T10:29:09Z")

</div>

Thx, I overlooked that delay setting. This works perfectly, and we don't need to process any data in between, only 'older data'.

---

<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: [March 8, 2022, 10:29am UTC](https://discuss.elastic.co/t/transforms-on-data-older-than-a-specific-timestamp-checkpoints-are-not-created/296483/4 "2022-03-08T10:29:33Z")

</div>

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