# Unable to run the default rollup job

**URL:** <https://discuss.elastic.co/t/unable-to-run-the-default-rollup-job/235426>\
**Category:** Elasticsearch\
**Created:** [June 2, 2020, 11:58pm UTC](https://discuss.elastic.co/t/unable-to-run-the-default-rollup-job/235426 "2020-06-02T23:58:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdevilla20](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jdevilla20/32/75281_2.png) [@jdevilla20](https://discuss.elastic.co/u/jdevilla20)\
**Post date:** [June 2, 2020, 11:58pm UTC](https://discuss.elastic.co/t/unable-to-run-the-default-rollup-job/235426/1 "2020-06-02T23:58:59Z")

</div>

Hi

I am trying to use rollup jobs to aggregate some queries. Here is my Elasticsearch version:

```auto
{
  "name" : "localhost-0",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "W6oclkz3SqK7GO3NnVyhGg",
  "version" : {
    "number" : "7.6.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "ef48eb35cf30adf4db14086e8aabd07ef6fb113f",
    "build_date" : "2020-03-26T06:34:37.794943Z",
    "build_snapshot" : false,
    "lucene_version" : "8.4.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

```

I am trying to run a rollup job using the following steps:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-getting-started.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-getting-started.html)

My data population looks like this:

```auto
curl -XPUT localhost:9200/sensor/_doc/3 -H 'Content-Type: application/json' -d'
{
   "timestamp": 1591138725,
   "temperature": 202,
   "voltage": 5.9,
   "node": "a"
}'

```

I am trying to create the job by doing the following:

```auto
curl -X PUT "localhost:9200/_rollup/job/sensor?pretty" -H 'Content-Type: application/json' -d'
{
    "index_pattern": "sensor",
    "rollup_index": "sensor_rollup",
    "cron": "*/30 * * * * ?",
    "page_size" :1000,
    "groups" : {
      "date_histogram": {
        "field": "timestamp",
        "fixed_interval": "60m"
      },
      "terms": {
        "fields": ["node"]
      }
    },
    "metrics": [
        {
            "field": "temperature",
            "metrics": ["min", "max", "sum"]
        },
        {
            "field": "voltage",
            "metrics": ["avg"]
        }
    ]
}
'

```

However, I am getting an error:

```auto
"reason" : "Validation Failed: 1: The field referenced by a date_histo group must be a [date] type across all indices in the index pattern. Found: [long] for field [timestamp];2: Could not find a [date] field with name [timestamp] in any of the indices matching the index pattern.;3: The field [node] must be aggregatable across all indices, but is not.;"

```

This was the default example found in the documentation. Am I doing something wrong?

---

<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:** [June 30, 2020, 11:59pm UTC](https://discuss.elastic.co/t/unable-to-run-the-default-rollup-job/235426/2 "2020-06-30T23:59:05Z")

</div>

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