Azure Data Lake Analytics Management Client Library for Python

0.6.0 · maintenance · verified Sat Apr 11

This is the Microsoft Azure Data Lake Analytics Management Client Library for Python, version 0.6.0. It provides programmatic access to manage Azure Data Lake Analytics accounts, jobs, policies, and catalogs through Azure Resource Manager (ARM). The 0.6.0 version was released in 2018 and was tested with Python 2.7, 3.4, 3.5, and 3.6. While a beta version 1.0.0b2 was released in late 2022, the 0.6.0 stable version represents an older generation of Azure SDKs, likely in maintenance mode, with a less frequent release cadence compared to newer 'Track 2' SDKs.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to authenticate with Azure using `DefaultAzureCredential` and then list existing Azure Data Lake Analytics accounts. Ensure your Azure credentials (e.g., Tenant ID, Client ID, Client Secret, Subscription ID) are configured as environment variables or other methods supported by `DefaultAzureCredential`.

import os
from azure.identity import DefaultAzureCredential
from azure.mgmt.datalake.analytics.account import DataLakeAnalyticsAccountManagementClient

# Set environment variables for authentication (e.g., AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID)
# For a quick start, ensure these are set or use Managed Identity in Azure environments.
# Example: export AZURE_TENANT_ID="<your-tenant-id>"
#          export AZURE_CLIENT_ID="<your-client-id>"
#          export AZURE_CLIENT_SECRET="<your-client-secret>"
#          export AZURE_SUBSCRIPTION_ID="<your-subscription-id>"

subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', 'YOUR_SUBSCRIPTION_ID')

# Authenticate using DefaultAzureCredential (recommended for modern Azure SDK usage)
# This credential chain tries various methods including environment variables, managed identity, etc.
credential = DefaultAzureCredential()

# Create the Data Lake Analytics Management Client
client = DataLakeAnalyticsAccountManagementClient(credential, subscription_id)

# Example: List Data Lake Analytics accounts in a subscription
print("Listing Data Lake Analytics accounts:")
for account in client.account.list():
    print(f"  - {account.name} (Location: {account.location})")

print("Quickstart finished successfully (if no errors occurred and accounts were listed).")

view raw JSON →