PowerShell wrapper for the Databricks API
Switch branches/tags
Nothing to show
Clone or download
Gerhard Brueckl
Gerhard Brueckl added Instance-Profiles API
Latest commit f1b7f38 Nov 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Modules/DatabricksPS added Instance-Profiles API Nov 13, 2018
Publish added Instance-Profiles API Nov 13, 2018
Tests/Content added automatic encode/decode for DBFS APIs Nov 12, 2018
Tools added Instance-Profiles API Nov 13, 2018
.gitattributes first commit from local version Oct 26, 2018
.gitignore added publish script Nov 6, 2018
LICENSE Initial commit Oct 26, 2018
README.md added Instance-Profiles API Nov 13, 2018

README.md

PowerShell Module for Databricks

This repository contains the source code for the PowerShell module "DatabricksPS". The module can also be found in the public PowerShell gallery: https://www.powershellgallery.com/packages/DatabricksPS/

It works for Databricks on Azure and also AWS. The APIs are almost identical so I decided to bundle them in one single module. The official API documentations can be found here:

Azure Databricks - https://docs.azuredatabricks.net/api/latest/index.html

Databricks on AWS - https://docs.databricks.com/api/latest/index.html

Setup

The easiest way to install the PowerShell module is to use the PowerShell built-in Install-Module cmdlet:

Install-Module -Name DatabricksPS

Alternatively you can also download this repository and copy the folder \Modules\DatabricksPS locally and install it from the local path, also using the Import-Module cmdlet:

Import-Module "C:\MyPSModules\Modules\DatabricksPS"

Usage

The module is designed to set the connection relevant properties once and they are used for all other cmdlets then. You can always update this information during your PS sessions to connect to different Databricks environments in the same session.

$accessToken = "dapi123456789e672c4007052d4694a7c51"
$apiUrl = "https://westeurope.azuredatabricks.net"

Set-DatabricksEnvironment -AccessToken "$accessToken" -ApiRootUrl "$apiUrl"

Once the environment is setup, you can use the other cmdlets:

Get-DatabricksWorkspaceItem -Path "/"
Export-DatabricksWorkspaceItem -Path "/TestNotebook1" -LocalPath "C:\TestNotebook1_Export.ipynb" -Format JUPYTER

Start-DatabricksJob -JobID 123 -NotebookParams @{myParameter = "test"}

Supported APIs and endpoint

Not yet supported APIs