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

Add DatabricksDBFSFile

Simon D'Morias edited this page Sep 15, 2019 · 5 revisions

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

Add-DatabricksDBFSFile

SYNOPSIS

Upload a file or folder of files from your local filesystem into DBFS.

SYNTAX

Add-DatabricksDBFSFile [[-BearerToken] <String>] [[-Region] <String>] [-LocalRootFolder] <String>
 [-FilePattern] <String> [-TargetLocation] <String> [<CommonParameters>]

DESCRIPTION

Upload a file or folder of files to DBFS. Supports exact path or pattern matching. Target folder in DBFS does not need to exist - they will be created as needed. Existing files will be overwritten. Use this as part of CI/CD pipeline to publish your code & libraries.

EXAMPLES

EXAMPLE 1

Add-DatabricksDBFSFile -BearerToken $BearerToken -Region $Region -LocalRootFolder "Samples" -FilePattern "Test.jar"  -TargetLocation '/test' -Verbose

This example uploads a single file called Test.jar which is a relative path to your working directory.

EXAMPLE 2

Add-DatabricksDBFSFile -BearerToken $BearerToken -Region $Region -LocalRootFolder Samples/DummyNotebooks -FilePattern "*.py"  -TargetLocation '/test2/' -Verbose

This example uploads a folder of py files

PARAMETERS

-BearerToken

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

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
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: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocalRootFolder

Path to file(s) to upload, can be relative or full. Note that subfolders are recursed always.

Type: String
Parameter Sets: (All)
Aliases:

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

-FilePattern

File pattern to match. Examples: .py . ProjectA.*

Type: String
Parameter Sets: (All)
Aliases:

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

-TargetLocation

Target folder in DBFS should start /. Does not need to exist.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 5
Default value: None
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