# Transform API is not updating automaticly when i add some data in the source index

**URL:** https://discuss.elastic.co/t/transform-api-is-not-updating-automaticly-when-i-add-some-data-in-the-source-index/294263
**Category:** Kibana
**Tags:** transforms
**Created:** [January 13, 2022, 11:22am UTC](https://discuss.elastic.co/t/transform-api-is-not-updating-automaticly-when-i-add-some-data-in-the-source-index/294263 "2022-01-13T11:22:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![waelboss](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@waelboss](https://discuss.elastic.co/u/waelboss)
#### Post date: [January 13, 2022, 11:22am UTC](https://discuss.elastic.co/t/transform-api-is-not-updating-automaticly-when-i-add-some-data-in-the-source-index/294263/1 "2022-01-13T11:22:42Z")

</div>

```auto
I am using a API transform to get specific metrics
here my query 

PUT _transform/index-transform
{
  "description": "Calculate the duration of an event from multiple status updates (based on its uniqueID)",
  "frequency": "1m",
  "source": {
    "index": "index*"
  },
  "dest": {
    "index": "index2"
  },
  "pivot": {
    "group_by": {
      "id": {
        "terms": {
          "field": "ProcessID"
        }
      }
    },
    "aggregations": {
      "event_count": {
        "value_count": {
          "field": "id"
        }
    },
      
      "start": {
        "min": {
          "field": "TimeStart"
        }
      },
      "stop": {
        "max": {
          "field": "TimeEnd"
        }
      },
      "est": {
        "max": {
          "field": "EstimatedTime"
        }
      },
      "durations": {
        "bucket_script": {
          "buckets_path": {
            "start": "start.value",
            "stop": "stop.value",
            "est": "est.value"
          },
          "script": """
            return (params.stop - params.start) / 1000;
          """
        }
      }
    }
  }
}

when i start the transform for the first time it works fine 
but when i add some data in the source index, the data comes in the source index but not in the transform index.

Could you please assist on how to fix this issue?

```

---

<div class="post-metadata">

### Author: ![mark8](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark8](https://discuss.elastic.co/u/mark8)
#### Post date: [January 13, 2022, 11:28am UTC](https://discuss.elastic.co/t/transform-api-is-not-updating-automaticly-when-i-add-some-data-in-the-source-index/294263/2 "2022-01-13T11:28:47Z")

</div>

Elastic noob here, but does this query really setup a `continuous` transform? I know I initially conflated the `frequency` field and the fact that the transform continuously runs.

I think specifying a frequency does not enable **continous** , but just specifies the frequency **if** you enable continuous. You might have to specify the `sync` field like in this [example](https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html#put-transform-example) to do so.

Additionally, you can easily check if it is continuous by inspecting the transform in the Kibana UI (Stack management/Data/Transforms).

---

<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: [February 10, 2022, 11:28am UTC](https://discuss.elastic.co/t/transform-api-is-not-updating-automaticly-when-i-add-some-data-in-the-source-index/294263/3 "2022-02-10T11:28:51Z")

</div>

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