Create an Event Hubs data connection for Azure Data Explorer

Azure Data Explorer offers ingestion from Event Hubs, a big data streaming platform and event ingestion service. Event Hubs can process millions of events per second in near real time.

In this article, you connect to an event hub and ingest data into Azure Data Explorer. For an overview on ingesting from Event Hubs, see Azure Event Hubs data connection.

To learn how to create the connection using the Kusto SDKs, see Create an Event Hubs data connection with SDKs.

For code samples based on previous SDK versions, see the archived article.

Create an event hub data connection

In this section, you establish a connection between the event hub and your Azure Data Explorer table. As long as this connection is in place, data is transmitted from the event hub into your target table. If the event hub is moved to a different resource or subscription, you need to update or recreate the connection.

Prerequisites

Get data

  1. In the Azure portal, go to your cluster and select Databases. Then, select the database that contains your target table.

    Screenshot of Azure Data Explorer web U I left menu, showing the Test Database item, selected.

  2. From the left menu, select Data ingestion. Then, in the top bar, select Add data connection.

  3. Fill out the form with the following information, and then select Create.

    Setting Suggested value Field description
    Data connection name test-hub-connection The name of the connection you want to create in Azure Data Explorer.
    Subscription The subscription ID where the event hub resource is located.
    Event hub namespace A unique namespace name The name you chose earlier that identifies your namespace.
    Event hub test-hub The event hub you created.
    Consumer group test-group The consumer group defined in the event hub you created.
    Event system properties Select relevant properties The event hub system properties. If there are multiple records per event message, the system properties are added to the first record. When adding system properties, create or update table schema and mapping to include the selected properties.
    Compression None The compression type of the event hub messages payload. Supported compression types: None, gzip.
    Managed Identity (recommended) System-assigned The managed identity used by the Data Explorer cluster for access to read from the event hub. We recommend using managed identities to control access to your event hub.

    Note:
    When the data connection is created:
    * System-assigned identities are automatically created if they don't exist
    * The managed identity is automatically assigned the Azure Event Hubs Data Receiver role and is added to your Data Explorer cluster. We recommend verifying that the role was assigned and that the identity was added to the cluster.

    Note

    If you have an existing data connection that is not using managed identities, we recommend updating it to use managed identities.

Remove an event hub data connection

Remove the data connection through the Azure portal as explained in the portal tab.