﻿---
title: Create a data view
description: Create a Kibana data view so Discover, Lens, and other analytics features can access your Elasticsearch indices, data streams, or aliases.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/find-and-organize/data-views/create-data-view
products:
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# Create a data view
Create a data view to make your own Elasticsearch data available in **Discover**, **Lens**, and other analytics features.

## Before you begin

- You need a role with the `Data View Management` Kibana privilege and the `view_index_metadata` Elasticsearch privilege. Refer to [Defining roles](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles).
- If a read-only indicator appears, you don't have sufficient privileges to create or save data views, and the buttons to do so aren't visible.
- You need data already indexed into Elasticsearch. Some workflows create a data view for you automatically instead — refer to [Data views](/elastic/docs-content/pull/7723/explore-analyze/find-and-organize/data-views#data-views-how-you-get-one).


## Create a data view

1. Open **Lens** or **Discover**, and then open the data view menu.
   ![How to set the data view in Discover](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/images/kibana-discover-data-view.png)
2. Select **Create a data view**.
3. Give your data view a name.
4. Start entering text in the **Index pattern** field, and Kibana looks for the names of indices, data streams, and aliases that match your input. You can view all available sources or only the sources that the data view targets.
   ![Create data view](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/images/kibana-create-data-view.png)
   - To match multiple sources, use a wildcard (*). `filebeat-*` matches `filebeat-apache-a`, `filebeat-apache-b`, and so on.
- To match multiple single sources, enter their names, separated by a comma. Do not include a space after the comma. `filebeat-a,filebeat-b` matches two indices.
- To exclude a source, use a minus sign (-), for example, `-test3`.
- To search across clusters or projects, or to point to a rollup index, refer to [Data view search syntax](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/find-and-organize/data-views/data-view-search-syntax).
5. Open the **Timestamp field** dropdown, and then select the default field for filtering your data by time.
   - If you don't set a default time field, you can't use global time filters on your dashboards. This is useful if you have multiple time fields and want to create dashboards that combine visualizations based on different timestamps.
- If your index doesn't have time-based data, select **I don't want to use the time filter**.
6. Select **Show advanced settings** to:
   - Allow hidden and system indices.
- Set a **Custom data view ID**. By default, Kibana assigns a randomly generated ID to the data view saved object. Setting a custom, human-readable ID (for example, `logs-prod`) makes the data view easier to recreate with the same ID across spaces, deployments, or environments, so that dashboards and visualizations that reference it keep working. Refer to [Manage dashboards as code](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/dashboards/manage-dashboards-as-code) for how stable IDs keep dashboards portable.
7. Select **Save data view to Kibana**.

You can now select your new data view from the data view menu in **Discover**, **Lens**, and other analytics features. Manage it from the **Data Views** page under the **Management** menu.

## Create a temporary data view

Want to explore your data or create a visualization without saving it as a data view? Select **Use without saving** in the **Create data view** form in **Discover** or **Lens**. With a temporary data view, you can add fields and create an Elasticsearch query alert, the same way you would with a regular data view. Your work isn't visible to others in your space.
A temporary data view remains in your space until you change apps, or until you save it.
![how to create an ad-hoc data view](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/images/ad-hoc-data-view.gif)

<note>
  Temporary data views aren't available in the **Management** menu.
</note>


## Related pages

- [Data view search syntax](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/find-and-organize/data-views/data-view-search-syntax)
- [Data views](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/find-and-organize/data-views)
- [Delete a data view](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/find-and-organize/data-views/delete-data-view)
- [Duplicate a data view](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7723/explore-analyze/find-and-organize/data-views/duplicate-data-view)