{"id":5749,"library":"azure-mgmt-databricks","title":"Azure Management Data Bricks Client Library for Python","description":"The Microsoft Azure Data Bricks Management Client Library for Python allows end users to operate on Azure Databricks Workspace and Access Connector resources. It is currently at version 2.0.0 and requires Python 3.7+. As part of the broader Azure SDK for Python, it follows a regular release cadence with updates and new features, with the last major release (2.0.0) on June 29, 2023.","status":"active","version":"2.0.0","language":"en","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python","tags":["azure","management","databricks","sdk","cloud","arm"],"install":[{"cmd":"pip install azure-mgmt-databricks azure-identity","lang":"bash","label":"Install package and authentication library"}],"dependencies":[{"reason":"Required for Azure Active Directory token authentication.","package":"azure-identity","optional":false},{"reason":"Core functionalities for Azure SDKs, including HTTP pipeline, error handling, and polling for long-running operations.","package":"azure-core","optional":false}],"imports":[{"symbol":"AzureDatabricksManagementClient","correct":"from azure.mgmt.databricks import AzureDatabricksManagementClient"},{"symbol":"DefaultAzureCredential","correct":"from azure.identity import DefaultAzureCredential"}],"quickstart":{"code":"import os\nfrom azure.identity import DefaultAzureCredential\nfrom azure.mgmt.databricks import AzureDatabricksManagementClient\n\n# Set these environment variables or replace with actual values\n# AZURE_SUBSCRIPTION_ID, AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET\nsubscription_id = os.environ.get(\"AZURE_SUBSCRIPTION_ID\", \"\")\n\nif not subscription_id:\n    raise ValueError(\"AZURE_SUBSCRIPTION_ID environment variable not set.\")\n\n# Authenticate using DefaultAzureCredential\n# This will try to authenticate using various methods (env vars, managed identity, Azure CLI, etc.)\ncredential = DefaultAzureCredential()\n\n# Create the Databricks Management Client\nclient = AzureDatabricksManagementClient(credential=credential, subscription_id=subscription_id)\n\n# Example: List all Databricks workspaces in the subscription\nprint(\"Listing Databricks workspaces:\")\nfor workspace in client.workspaces.list_by_subscription():\n    print(f\"  - {workspace.name} (Resource Group: {workspace.id.split('/')[4]}) (Location: {workspace.location})\")\n","lang":"python","description":"This quickstart demonstrates how to authenticate using `DefaultAzureCredential` and list Azure Databricks workspaces within a subscription. Ensure `AZURE_SUBSCRIPTION_ID`, and potentially `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET` environment variables are set for successful authentication."},"warnings":[{"fix":"Replace old credential classes with `azure.identity` and update the client instantiation to use the `credential` parameter.","message":"The credential system was completely revamped in v2.x. Classes like `azure.common.credentials` or `msrestazure.azure_active_directory` are no longer supported. You must migrate to `azure-identity` classes (e.g., `DefaultAzureCredential`). The client constructor parameter `credentials` was renamed to `credential`.","severity":"breaking","affected_versions":"< 2.0.0 (v1.x)"},{"fix":"Update method calls to use the `begin_` prefix for LROs and handle the `azure.core.polling.LROPoller` return type.","message":"Operations that previously returned `msrest.polling.LROPoller` for long-running operations (LROs) now return `azure.core.polling.LROPoller` and are typically prefixed with `begin_` (e.g., `create_or_update` becomes `begin_create_or_update`).","severity":"breaking","affected_versions":"< 2.0.0 (v1.x)"},{"fix":"Update exception handling to catch `azure.core.exceptions.HttpResponseError` instead of `CloudError`.","message":"The exception hierarchy has been simplified. Most exceptions are now `azure.core.exceptions.HttpResponseError`. The `CloudError` exception has been removed.","severity":"breaking","affected_versions":"< 2.0.0 (v1.x)"},{"fix":"Ensure you are using the correct SDK for your task: `azure-mgmt-databricks` for Azure resource management, `databricks-sdk` for in-workspace or Databricks API interactions.","message":"This library (`azure-mgmt-databricks`) is for *managing* Azure Databricks workspaces and resources (create, update, delete). It is distinct from the `Databricks SDK for Python` (pypi: `databricks-sdk`), which is used for interacting with Databricks *within* a Databricks environment (e.g., notebooks, jobs, clusters, data plane operations) or through the Databricks REST API. Users often confuse these two, leading to incorrect package usage for their intended task.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your environment uses Python 3.7 or a later version.","message":"Python 2.7 support for Azure SDK for Python packages ended on January 1, 2022. This `azure-mgmt-databricks` package specifically requires Python 3.7 or newer.","severity":"gotcha","affected_versions":"< 2.0.0 (and any attempt to use with Python 2.7)"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}