| title | Create a KQL database |
|---|---|
| description | Learn how to create a KQL database in Real-Time Intelligence. |
| ms.reviewer | tzgitlin |
| ms.topic | how-to |
| ms.subservice | rti-eventhouse |
| ms.date | 03/19/2025 |
| ms.search.form | KQL Database |
In Real-Time Intelligence, you interact with your data in the context of eventhouses, databases, and tables. A single workspace can hold multiple Eventhouses, an eventhouse can hold multiple databases, and each database can hold multiple tables.
In this article, you learn how to create a new KQL database. Once your KQL database has data, you can proceed to query your data using Kusto Query Language in a KQL queryset.
-
To create a new KQL database, in the Eventhouse explorer either:
-
Select Eventhouse then New database +
-
Under KQL Databases select +
:::image type="content" source="media/create-database/create-database.png" alt-text="Screenshot showing the eventhouse KQL Databases section.":::
-
-
Enter your database name, select your database type, either New database (default) or New shortcut database (follower), then select Create. For information about follower databases, see Create a database shortcut.
[!NOTE] The database name can contain alphanumeric characters, underscores, periods, and hyphens. Special characters aren't supported.
:::image type="content" source="media/create-database/new-database.png" alt-text="Screenshot of the New KQL Database window showing the database name. The Create button is highlighted.":::
The KQL database is created within the context of the selected eventhouse. You can also Create an empty table.
When you create a new KQL database, an attached environment is automatically created to explore and manage the KQL database using KQL queries. For more information, see KQL overview.
-
To access the query environment, select KQLdatabasename_queryset from your KQL database object tree.
:::image type="content" source="media/create-database/attached-queryset.png" alt-text="Screenshot of new attached KQL queryset to a KQL database.":::
-
To rename the query environment, select the Pencil icon next to its name, and enter a new name.
:::image type="content" source="media/create-database/rename-queryset.png" alt-text="Screenshot of the Rename queryset window showing the queryset name and the Pencil icon.":::