AZ.Databricks PowerShell Reference
The Az.Databricks module provides cmdlets for managing Azure Databricks workspaces, clusters, and related resources. This module allows you to automate the provisioning and configuration of your Databricks environment within Azure.
Cmdlets
New-AzDatabricksAccessConnector
Creates a new Azure Databricks access connector.
Syntax
New-AzDatabricksAccessConnector -ResourceGroupName -Name -Location [-SubscriptionId ] [-Tags ] [-DefaultProfile ] []
Parameters
| Name | Type | Description |
|---|---|---|
| -ResourceGroupName | String | The name of the resource group. |
| -Name | String | The name of the access connector. |
| -Location | String | The Azure region where the resource will be created. |
| -Tags | Hashtable | A hashtable of tags to apply to the resource. |
Example
New-AzDatabricksAccessConnector -ResourceGroupName "MyResourceGroup" -Name "MyAccessConnector" -Location "East US"
Get-AzDatabricksAccessConnector
Gets one or more Azure Databricks access connectors.
Syntax
Get-AzDatabricksAccessConnector [-ResourceGroupName ] [-Name ] [-SubscriptionId ] [-DefaultProfile ] []
Parameters
| Name | Type | Description |
|---|---|---|
| -ResourceGroupName | String | The name of the resource group. |
| -Name | String | The name of the access connector. |
Example
Get-AzDatabricksAccessConnector -ResourceGroupName "MyResourceGroup" -Name "MyAccessConnector"
Get-AzDatabricksAccessConnector -ResourceGroupName "MyResourceGroup"
New-AzDatabricksCluster
Creates a new Azure Databricks cluster.
Syntax
New-AzDatabricksCluster -WorkspaceName -ResourceGroupName -ClusterName -NodeType -NumWorkers -Autoscale [-SubscriptionId ] [-DefaultProfile ] []
Parameters
| Name | Type | Description |
|---|---|---|
| -WorkspaceName | String | The name of the Databricks workspace. |
| -ResourceGroupName | String | The name of the resource group. |
| -ClusterName | String | The name for the new cluster. |
| -NodeType | String | The VM node type for the cluster (e.g., Standard_DS3_v2). |
| -NumWorkers | Int32 | The number of worker nodes. |
| -Autoscale | PSDatabricksAutoscale | An object defining autoscaling settings. |
Example
$autoscale = New-Object Microsoft.Azure.Commands.Databricks.Models.PSDatabricksAutoscale -Property @{MinWorkers=1; MaxWorkers=4}
New-AzDatabricksCluster -WorkspaceName "myworkspace" -ResourceGroupName "MyResourceGroup" -ClusterName "mycluster" -NodeType "Standard_DS3_v2" -NumWorkers 1 -Autoscale $autoscale
New-AzDatabricksWorkspace
Creates a new Azure Databricks workspace.
Syntax
New-AzDatabricksWorkspace -ResourceGroupName -Name -Location -Sku [-SubscriptionId ] [-Tags ] [-DefaultProfile ] []
Parameters
| Name | Type | Description |
|---|---|---|
| -ResourceGroupName | String | The name of the resource group. |
| -Name | String | The name of the Databricks workspace. |
| -Location | String | The Azure region where the workspace will be created. |
| -Sku | String | The SKU of the Databricks workspace (e.g., "standard", "premium"). |
| -Tags | Hashtable | A hashtable of tags to apply to the resource. |
Example
New-AzDatabricksWorkspace -ResourceGroupName "MyResourceGroup" -Name "myworkspace" -Location "East US" -Sku "standard"
Get-AzDatabricksWorkspace
Gets one or more Azure Databricks workspaces.
Syntax
Get-AzDatabricksWorkspace [-ResourceGroupName ] [-Name ] [-SubscriptionId ] [-DefaultProfile ] []
Parameters
| Name | Type | Description |
|---|---|---|
| -ResourceGroupName | String | The name of the resource group. |
| -Name | String | The name of the Databricks workspace. |
Example
Get-AzDatabricksWorkspace -ResourceGroupName "MyResourceGroup" -Name "myworkspace"
Get-AzDatabricksWorkspace -ResourceGroupName "MyResourceGroup"
Common Examples
Creating and accessing a Databricks Workspace
$workspace = New-AzDatabricksWorkspace -ResourceGroupName "DatabricksRG" -Name "my-unique-workspace-name" -Location "West Europe" -Sku "premium"
$workspace | Format-List
Creating a Databricks Cluster with Autoscaling
$autoscale = New-Object Microsoft.Azure.Commands.Databricks.Models.PSDatabricksAutoscale -Property @{MinWorkers=2; MaxWorkers=8}
New-AzDatabricksCluster -WorkspaceName "my-unique-workspace-name" -ResourceGroupName "DatabricksRG" -ClusterName "data-science-cluster" -NodeType "Standard_E8s_v3" -Autoscale $autoscale -SparkVersion "7.3.x-scala2.12" -NodeCount 2
Listing all clusters in a workspace
Get-AzDatabricksCluster -WorkspaceName "my-unique-workspace-name" -ResourceGroupName "DatabricksRG"