-
Notifications
You must be signed in to change notification settings - Fork 63
Add DatabricksDBFSFile
external help file: azure.databricks.cicd.tools-help.xml Module Name: azure.databricks.cicd.tools online version: schema: 2.0.0
Upload a file or folder of files from your local filesystem into DBFS.
Add-DatabricksDBFSFile [[-BearerToken] <String>] [[-Region] <String>] [-LocalRootFolder] <String>
[-FilePattern] <String> [-TargetLocation] <String> [<CommonParameters>]
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.
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.
Add-DatabricksDBFSFile -BearerToken $BearerToken -Region $Region -LocalRootFolder Samples/DummyNotebooks -FilePattern "*.py" -TargetLocation '/test2/' -Verbose
This example uploads a folder of py files
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
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
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
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
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
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Simon D'Morias / Data Thirst Ltd