Sagui Itay - Unity Assets, software development and mobile games

Creating an Azure Data Explorer cluster in ARM

As I’ve mentioned in the past, I work as part of Microsoft’s team responsible for Azure Data Explorer. Azure Data Explorer (ADX) 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. You can use Azure Data Explorer to collect, store, and analyze diverse data to improve products, enhance customer experiences, monitor devices, and boost operations.

I’m part of the team that implemented the integration with Azure’s ARM model (and the Azure Portal). Using ARM, you can easily create and manage your resources in a unified API (with support for REST, .Net, Javascript, Python and a few other languages I keep forgetting).

Azure Data Explorer starts with a Cluster, which contains one or more Databases. Each Database in turns contains one or more Table. Tables can then be queried with an extremely versatile and powerful language called Kusto query language.

Creating an Azure Data Explorer

Here, I’d like to demonstrate the simplest way to create an ADX cluster using ARM’s REST API, and the armclient command-line tool.

  1. First, what you need is an Azure subscription. If you don’t have an Azure subscription, create a free Azure account before you begin.
  2. Get the armclient tool from GitHub: https://github.com/projectkudu/ARMClient
  3. Login to your Azure subscription:
    armclient login
  4. Create a JSON file with the following content, and save it as myfirstadx.json:
    {
    "name": "myfirstadx",
    "type": "Microsoft.Kusto/Clusters",
    "location": "West US 2",
    "sku": {
    "name": "Standard_D11_v2",
    "tier": "Standard",
    "capacity": 2
    },
    "properties": {}
    }
    You can read about the exact details of each value in the reference documentation: https://docs.microsoft.com/en-us/azure/templates/microsoft.kusto/2019-05-15/clusters
  5. Perform a PUT request using armclient to submit the JSON to ARM:
    armclient PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Kusto/clusters/myfirstadx?api-version=2019-05-15 @myfirstadx.json -verbose
  6. As part of the response, you’ll get a Azure-AsyncOperation header with a URL that points to the status of the operation. For example: https://management.azure.com/subscriptions/<subscriptionId>/providers/Microsoft.Kusto/locations/<region>/operations/<operationId>?api-version=2019-05-12
  7. You can perform GET requests using armclient on the provided URL to track the status of the operation:
    armclient GET https://management.azure.com/subscriptions/<subscriptionId>/providers/Microsoft.Kusto/locations/<region>/operations/<operationId>?api-version=2019-05-12

Azure Data Explorer creation usually takes a few minutes to complete.

In the next post, I’ll describe a few more advanced scenarios, such as creating databases, configuring your cluster to your needs, and perform other management tasks.