This module contains Azure Data Explorer hook.

Module Contents



Interact with Azure Data Explorer (Kusto).


Bases: airflow.hooks.base.BaseHook

Interact with Azure Data Explorer (Kusto).


Azure Data Explorer cluster is specified by a URL, for example: “”. The parameter must be provided through the Data Explorer Cluster URL connection detail.

Tenant ID:

To learn about tenants refer to:

Authentication methods:

Available authentication methods are:

  • AAD_APP: Authentication with AAD application certificate. A Tenant ID is required when using this method. Provide application ID and application key through Username and Password parameters.

  • AAD_APP_CERT: Authentication with AAD application certificate. Tenant ID, Application PEM Certificate, and Application Certificate Thumbprint are required when using this method.

  • AAD_CREDS: Authentication with AAD username and password. A Tenant ID is required when using this method. Username and Password parameters are used for authentication with AAD.

  • AAD_DEVICE: Authenticate with AAD device code. Please note that if you choose this option, you’ll need to authenticate for every new instance that is initialized. It is highly recommended to create one instance and use it for all queries.


azure_data_explorer_conn_id (str) – Reference to the Azure Data Explorer connection.

conn_name_attr = 'azure_data_explorer_conn_id'[source]
default_conn_name = 'azure_data_explorer_default'[source]
conn_type = 'azure_data_explorer'[source]
hook_name = 'Azure Data Explorer'[source]
classmethod get_connection_form_widgets()[source]

Return connection widgets to add to connection form.

classmethod get_ui_field_behaviour()[source]

Return custom field behaviour.


Return a KustoClient object (cached).


Return a KustoClient object.

run_query(query, database, options=None)[source]

Run KQL query using provided configuration, and return KustoResponseDataSet instance.

See: If query is unsuccessful AirflowException is raised.



Return type

Was this entry helpful?