Azure Data Explorer クラスターとデータベースを作成します

Azure Data Explorer は、アプリケーション、Web サイト、IoT デバイスなどからの大量のデータ ストリーミングをリアルタイムに分析するための高速でフル マネージドのデータ分析サービスです。 Azure Data Explorer を使用するには、最初にクラスターを作成し、そのクラスター内に 1 つまたは複数のデータベースを作成します。 その後、データをデータベースに取り込み (読み込み)、データに対してクエリを実行できます。

この記事では、C#、Python、Go、Azure CLI、PowerShell、Bicep、または Azure Resource Manager (ARM) テンプレートを使用してクラスターとデータベースを作成する方法について説明します。 Azure portal を使用してクラスターとデータベースを作成する方法を確認するには、「クイック スタート: Azure Data Explorer クラスターとデータベースを作成する」を参照してください。

以前の SDK バージョンに基づくコード サンプルについては、アーカイブ記事を参照してください。

前提条件

クラスターとデータベースの作成方法別の前提条件:

Azure Data Explorer クラスターを作成します

このセクションでは、Azure Data Explorer クラスターを作成するプロセスについて説明します。 クラスターを作成するために推奨される方法に関連するタブを選択します。

ARM テンプレート

以下は、最小限の構成でAzure Data Explorerクラスターとそのクラスター内にデータベースを作成する ARM テンプレートの例です。 詳細とサポートされるプロパティについては、 ARM テンプレート クラスターリファレンスARM テンプレート データベース リファレンスを参照してください。

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "clusters_kustocluster_name": {
            "type": "string",
            "defaultValue": "[concat('kusto', uniqueString(resourceGroup().id))]",
            "metadata": {
                "description": "Name of the cluster to create"
            }
        },
        "databases_kustodb_name": {
            "type": "string",
            "defaultValue": "kustodb",
            "metadata": {
                "description": "Name of the database to create"
            }
        },
        "location": {
            "type": "string",
            "defaultValue": "[resourceGroup().location]",
            "metadata": {
                "description": "Location for all resources."
            }
        }
    },
    "variables": {},
    "resources": [
        {
            "name": "[parameters('clusters_kustocluster_name')]",
            "type": "Microsoft.Kusto/clusters",
            "apiVersion": "2025-02-14",
            "location": "[parameters('location')]",
            "sku": {
                "name": "Standard_E8ads_v5",
                "tier": "Standard",
                "capacity": 2
            }
        },
        {
            "name": "[concat(parameters('clusters_kustocluster_name'), '/', parameters('databases_kustodb_name'))]",
            "type": "Microsoft.Kusto/clusters/databases",
            "apiVersion": "2025-02-14",
            "location": "[parameters('location')]",
            "dependsOn": [
                "[resourceId('Microsoft.Kusto/clusters', parameters('clusters_kustocluster_name'))]"
            ],
            "kind": "ReadWrite",
            "properties": {
                "softDeletePeriod": "P365D",
                "hotCachePeriod": "P31D"
            }
        }
    ]
}

Azure Data Explorer データベースを作成する

このセクションでは、前のセクションで作成したクラスター内にデータベースを作成します。

クラスターとデータベースは、前のセクションの ARM テンプレートと共に作成されます。

次のステップ