# Data stream timestamp in the name of index

**URL:** <https://discuss.elastic.co/t/data-stream-timestamp-in-the-name-of-index/329080>\
**Category:** Elasticsearch\
**Created:** [March 31, 2023, 7:35pm UTC](https://discuss.elastic.co/t/data-stream-timestamp-in-the-name-of-index/329080 "2023-03-31T19:35:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)\
**Post date:** [March 31, 2023, 7:35pm UTC](https://discuss.elastic.co/t/data-stream-timestamp-in-the-name-of-index/329080/1 "2023-03-31T19:35:40Z")

</div>

Hi  
Is it possible to achieve name with timestamp from ingest data to elasticsearch in the index name like

```auto
.ds-<data-stream>-<yyyy.MM.dd>-<generation>

.ds-<data-stream><mytimestamp_from_log>-<generation>

```

I've tried to make by

```auto

  "data_stream": {
    "hidden": false,
    "allow_custom_routing": false,
	"timestamp_field": "@timestamp"
  },

```

But it doesn't work. I didn't find any solution in docs but something on [Fix the timestamp field of a data stream to @timestamp (#59076) · elastic/elasticsearch@cb6b05d · GitHub](https://github.com/elastic/elasticsearch/commit/cb6b05d12b97dd61da9f09d5b76fe19d4afef62f)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 31, 2023, 8:25pm UTC](https://discuss.elastic.co/t/data-stream-timestamp-in-the-name-of-index/329080/2 "2023-03-31T20:25:48Z")

</div>

No yhat is not possible. With data streams all indexed data goes into a single backing index at any point in time.

Why do you need this?

If you want this behaviour, then use traditional time- based indices with the date in the index name instead of data streams.

---

<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:** [April 28, 2023, 8:25pm UTC](https://discuss.elastic.co/t/data-stream-timestamp-in-the-name-of-index/329080/3 "2023-04-28T20:25:53Z")

</div>

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