Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Connect Databricks

Simon D'Morias edited this page Oct 24, 2019 · 3 revisions

external help file: azure.databricks.cicd.tools-help.xml Module Name: azure.databricks.cicd.tools online version: schema: 2.0.0

Connect-Databricks

SYNOPSIS

Connects your current PowerShell session to Azure Databricks.

SYNTAX

Bearer (Default)

Connect-Databricks -BearerToken <String> -Region <String> [<CommonParameters>]

AADwithResource

Connect-Databricks -Region <String> -ApplicationId <String> -Secret <String> -TenantId <String>
 -SubscriptionId <String> -ResourceGroupName <String> -WorkspaceName <String> [-Force] [<CommonParameters>]

AADwithOrgId

Connect-Databricks -Region <String> -ApplicationId <String> -Secret <String> -DatabricksOrgId <String>
 -TenantId <String> [-Force] [<CommonParameters>]

DESCRIPTION

Connects your current PowerShell session to Azure Databricks. Supports Service Princial AAD authenication or via Databricks Bearer Token

EXAMPLES

EXAMPLE 1

Connect-Databricks -Region "westeurope" -ApplicationId "8a686772-0e5b-4cdb-ad19-bf1d1e7f89f3" -Secret "myPrivateSecret" -DatabricksOrgId 1234567 -TenantId "8a686772-0e5b-4cdb-ad19-bf1d1e7f89f3"

This example of a DIRECT connection (using the Databricks organisation Id)

EXAMPLE 2

Connect-Databricks -Region "westeurope" -ApplicationId "8a686772-0e5b-4cdb-ad19-bf1d1e7f89f3" -Secret "myPrivateSecret" -ResourceGroupName "MyResourceGroup" -SubscriptionId "9a686882-0e5b-4edb-cd49-cf1f1e7f34d9" -WorkspaceName "workspaceName" -TenantId "8a686772-0e5b-4cdb-ad19-bf1d1e7f89f3"

This example of a MANAGMENT connection (using the Azure resource identifiers to connect)

EXAMPLE 3

Connect-Databricks -BearerToken "dapi1234567890" -Region "westeurope"

This example of a BEARER connection (using the Databricks Bearer token from the Web UI to login as a person)

PARAMETERS

-BearerToken

Your Databricks Bearer token to authenticate to your workspace (see User Settings in Databricks WebUI)

Type: String
Parameter Sets: Bearer
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Region

Azure Region - must match the URL of your Databricks workspace, example northeurope

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationId

Azure Active Directory Service Principal Client ID (also known as Application ID)

Type: String
Parameter Sets: AADwithResource, AADwithOrgId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Secret

Secret for given Client ID

Type: String
Parameter Sets: AADwithResource, AADwithOrgId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabricksOrgId

Databricks OrganisationID this is found in the URL of your Worksapce as the o parameters (example o=123456789). Note the first time a service principal connects it must use the MANAGEMENT method (ie provide the Resource GRoup Name and Workspace Name - as this provisions the user)

Type: String
Parameter Sets: AADwithOrgId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TenantId

Tenant Id (Directory ID) for the AAD owning the ApplicationId

Type: String
Parameter Sets: AADwithResource, AADwithOrgId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionId

Subscription ID for the Workspace

Type: String
Parameter Sets: AADwithResource
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName

Resource Group Name for the Workspace

Type: String
Parameter Sets: AADwithResource
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkspaceName

Workspace Name

Type: String
Parameter Sets: AADwithResource
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

Removes any cached credentials and reconnects

Type: SwitchParameter
Parameter Sets: AADwithResource, AADwithOrgId
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Author: Simon D'Morias / Data Thirst Ltd

RELATED LINKS

Clone this wiki locally