Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Azure Data Explorer is a fast, fully managed data analytics service for real-time analysis on large volumes of data streaming from applications, websites, IoT devices, and more. To use Azure Data Explorer, you first create a cluster, and create one or more databases in that cluster. Then, you can ingest (load) data into a database and run queries against it.
In this article, you'll learn how to create a cluster and a database using either C#, Python, Go, the Azure CLI, PowerShell, or an Azure Resource Manager (ARM) template. To learn how to create a cluster and database using the Azure portal, see Quickstart: Create an Azure Data Explorer cluster and database.
For code samples based on previous SDK versions, see the archived article.
Prerequisites by method of cluster and database creation:
az --version
to check your version. If you need to install or upgrade, see Install the Azure CLI.The following steps aren't required if you're running commands in Azure Cloud Shell. If you're running the CLI locally, follow these steps to set up the environment:
Install extension to use the latest Kusto CLI version:
az extension add -n kusto
Run the following command to sign in to Azure:
az login
Set the subscription where you want your cluster to be created. Replace MyAzureSub
with the name of the Azure subscription that you want to use:
az account set --subscription MyAzureSub
Set the resource group where you want your cluster to be created. Replace testrg
with the name of the resource group that you want to use:
az group create --name testrg --location westus
This section guides you through the process of creating an Azure Data Explorer cluster. Choose the relevant tab for your preferred method to create the cluster.
Create your cluster by using the following command:
az kusto cluster create --cluster-name azureclitest --sku name="Standard_E8ads_v5" tier="Standard" --resource-group testrg --location westus
Setting | Suggested value | Field description |
---|---|---|
name | azureclitest | The desired name of your cluster. |
sku | Standard_E8ads_v5 | The SKU that will be used for your cluster. Parameters: name - The SKU name. tier - The SKU tier. |
resource-group | testrg | The resource group name where the cluster will be created. |
location | westus | The location where the cluster will be created. |
There are other optional parameters that you can use, such as the capacity of the cluster.
Run the following command to check whether your cluster was successfully created:
az kusto cluster show --cluster-name azureclitest --resource-group testrg
Confirm the successful creation of the cluster by verifying the result contains provisioningState
as Succeeded
.
In this section, you'll create a database within the cluster created in the previous section.
Create your database by using the following command:
az kusto database create --cluster-name azureclitest --database-name clidatabase --resource-group testrg --read-write-database soft-delete-period=P365D hot-cache-period=P31D location=westus
Setting | Suggested value | Field description |
---|---|---|
cluster-name | azureclitest | The name of your cluster where the database will be created. |
database-name | clidatabase | The name of your database. |
resource-group | testrg | The resource group name where the cluster will be created. |
read-write-database | P365D P31D westus | The database type. Parameters: soft-delete-period - Signifies the amount of time the data will be kept available to query. See retention policy for more information. hot-cache-period - Signifies the amount of time the data will be kept in cache. See cache policy for more information. location -The location where the database will be created. |
Run the following command to see the database that you created:
az kusto database show --database-name clidatabase --resource-group testrg --cluster-name azureclitest
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Create a lake database in Azure Synapse Analytics - Training
Create a lake database in Azure Synapse Analytics
Certification
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Documentation
Create a table in Azure Data Explorer - Azure Data Explorer
Learn how to easily create a table and manually define the schema in Azure Data Explorer with the table creation wizard.
Quickstart: Create an Azure Data Explorer cluster and database - Azure Data Explorer
In this quickstart, you learn how to create an Azure Data Explorer cluster and database.
Automated provisioning in Azure Data Explorer - Azure Data Explorer
This article provides an overview of the different mechanisms for automating the provisioning of Azure Data Explorer environments.