Microsoft Azure Data Explorer Connection

The Microsoft Azure Blob Storage connection type enables the Azure Blob Storage Integrations.

Authenticating to Azure Data Explorer

There are three ways to connect to Azure Data Explorer using Airflow.

  1. Use AAD application certificate i.e. use AAD_APP or AAD_APP_CERT as auth_method in the Airflow connection.

  2. Use AAD username and password i.e. use AAD_CREDS as auth_method in the Airflow connection.

  3. Use a AAD device code i.e. use AAD_DEVICE as auth_method in the Airflow connection.

Only one authorization method can be used at a time. If you need to manage multiple credentials or keys then you should configure multiple connections.

Default Connection IDs

All hooks and operators related to Microsoft Azure Data Explorer use azure_data_explorer_default by default.

Configuring the Connection

Login (optional)

Specify the username used for data explorer. Needed for with AAD_APP, AAD_APP_CERT, and AAD_CREDS authentication methods.

Password (optional)

Specify the password used for data explorer. Needed for with AAD_APP, and AAD_CREDS authentication methods.

Host

Specify the data explorer cluster url. Needed for all authentication methods.

Extra (optional)

Specify the extra parameters (as json dictionary) that can be used in Azure connection. The following parameters are all optional:

  • auth_method: Specify authentication method. Available authentication methods are:

    AAD_APP : Authentication with AAD application certificate. Extra parameters: "tenant" 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. Extra parameters: "tenant", "certificate" and "thumbprint" are required when using this method.

    AAD_CREDS : Authentication with AAD username and password. Extra parameters: "tenant" 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.

  • tenant: Specify AAD tenant. Needed for AAD_APP, AAD_APP_CERT, and AAD_CREDS.

  • certificate: Specify the certificate. Needed for AAD_APP_CERT authentication method.

  • thumbprint: Specify the thumbprint needed for use with AAD_APP_CERT authentication method.

When specifying the connection in environment variable you should specify it using URI syntax.

Note that all components of the URI should be URL-encoded.

For example:

export AIRFLOW_CONN_AZURE_DATA_EXPLORER_DEFAULT='azure-data-explorer://add%20username:add%20password@mycluster.com?auth_method=AAD_APP&tenant=tenant+id'

Was this entry helpful?