# Error when trying to index to data streamd

**URL:** <https://discuss.elastic.co/t/error-when-trying-to-index-to-data-streamd/298603>\
**Category:** Elasticsearch\
**Tags:** datastreams\
**Created:** [March 2, 2022, 9:52am UTC](https://discuss.elastic.co/t/error-when-trying-to-index-to-data-streamd/298603 "2022-03-02T09:52:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 2, 2022, 9:52am UTC](https://discuss.elastic.co/t/error-when-trying-to-index-to-data-streamd/298603/1 "2022-03-02T09:52:34Z")

</div>

I've created an index template + a data stream and tried to bulk create from Go library.

Request is:

```auto
{"create":{}}
{"@timestamp":"2022-03-02T12:48:23+03:00","domain_name":"adlook-rev.me","domain_type":"","webmaster_pin":37530221,"device_type":"pc","device_os":"Windows","browser_type":"","country":"IL","city":""}

```

Error:

```auto
{"type":"illegal_argument_exception","reason":"Mapper for [_data_stream_timestamp] conflicts with existing mapper:\\n\\tCannot update parameter [enabled] from [true] to [false]"}"

```

Sending the same request from the console in Kibana is fine:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/8/78cc1985c123689fb3661ff5197d87fd9a9961d7.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/3/2372133bf1d8776faa920d426e0a65d91309b4c4.png)

What could be the reason for this?

---

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 2, 2022, 9:54am UTC](https://discuss.elastic.co/t/error-when-trying-to-index-to-data-streamd/298603/2 "2022-03-02T09:54:16Z")

</div>

GET \_index\_templates/inventories  
returns this:

```auto
{
  "index_templates" : [
    {
      "name" : "inventories",
      "index_template" : {
        "index_patterns" : [
          "inventories"
        ],
        "template" : {
          "settings" : {
            "index" : {
              "lifecycle" : {
                "name" : "inventories-ilm"
              },
              "routing" : {
                "allocation" : {
                  "require" : {
                    "data" : "hot"
                  }
                }
              },
              "sort" : {
                "field" : [
                  "@timestamp"
                ],
                "order" : [
                  "asc"
                ]
              },
              "number_of_replicas" : "0"
            }
          },
          "mappings" : {
            "_routing" : {
              "required" : false
            },
            "dynamic" : false,
            "_source" : {
              "excludes" : [],
              "includes" : [],
              "enabled" : true
            },
            "dynamic_templates" : [],
            "properties" : {
              "country" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "ignore_above" : 256,
                    "type" : "keyword"
                  }
                }
              },
              "domain_name" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "ignore_above" : 256,
                    "type" : "keyword"
                  }
                }
              },
              "domain_type" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "ignore_above" : 256,
                    "type" : "keyword"
                  }
                }
              },
              "@timestamp" : {
                "index" : true,
                "ignore_malformed" : false,
                "store" : false,
                "type" : "date",
                "doc_values" : true
              },
              "city" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "ignore_above" : 256,
                    "type" : "keyword"
                  }
                }
              },
              "browser_type" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "ignore_above" : 256,
                    "type" : "keyword"
                  }
                }
              },
              "webmaster_pin" : {
                "type" : "long"
              },
              "device_type" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "ignore_above" : 256,
                    "type" : "keyword"
                  }
                }
              },
              "device_os" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "ignore_above" : 256,
                    "type" : "keyword"
                  }
                }
              }
            }
          }
        },
        "composed_of" : [],
        "data_stream" : {
          "hidden" : false
        }
      }
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 2, 2022, 9:55am UTC](https://discuss.elastic.co/t/error-when-trying-to-index-to-data-streamd/298603/3 "2022-03-02T09:55:34Z")

</div>

GET inventories

```auto
{
  ".ds-inventories-2022.03.02-000001" : {
    "aliases" : { },
    "mappings" : {
      "dynamic" : "true",
      "_data_stream_timestamp" : {
        "enabled" : true
      },
      "dynamic_date_formats" : [
        "strict_date_optional_time",
        "yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z"
      ],
      "dynamic_templates" : [],
      "date_detection" : true,
      "numeric_detection" : false,
      "properties" : {
        "@timestamp" : {
          "type" : "date"
        },
        "browser_type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "city" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "country" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "device_os" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "device_type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "domain_name" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "domain_type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "webmaster_pin" : {
          "type" : "long"
        }
      }
    },
    "settings" : {
      "index" : {
        "lifecycle" : {
          "name" : "inventories-ilm"
        },
        "routing" : {
          "allocation" : {
            "require" : {
              "data" : "hot"
            }
          }
        },
        "hidden" : "true",
        "number_of_shards" : "1",
        "provided_name" : ".ds-inventories-2022.03.02-000001",
        "creation_date" : "1646213499536",
        "sort" : {
          "field" : [
            "@timestamp"
          ],
          "order" : [
            "asc"
          ]
        },
        "priority" : "100",
        "number_of_replicas" : "0",
        "uuid" : "C0DugtUxQnSbOahY56bS9w",
        "version" : {
          "created" : "7140199"
        }
      }
    },
    "data_stream" : "inventories"
  }
}

```

Seems to be a problem with "\_data\_stream\_timestamp" : {  
"enabled" : true  
}, but what can I do about it?

---

<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 30, 2022, 10:03am UTC](https://discuss.elastic.co/t/error-when-trying-to-index-to-data-streamd/298603/5 "2022-03-30T10:03:12Z")

</div>

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