< Back

Test-AzureDatabricksWorkspacePath

Sun Jan 19, 2020 6:08 pm

NAME Test-AzureDatabricksWorkspacePath



SYNOPSIS

Tests a given Azure Databricks workspace path.





SYNTAX

Test-AzureDatabricksWorkspacePath [-Connection] <Object> [-Path] <String> [-AutoCreateParentDirectories]

[<CommonParameters>]





DESCRIPTION

This function will test for the presence of a given Azure Databricks workspace path/folder. If the folder does not

exist, it throws an exception.

Supports the ability to have any missing parent paths created via the -AutoCreateParentDirectories path.





PARAMETERS

-Connection <Object>

An object that represents an Azure Databricks API connection where you want to test your paths.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

The workspace path you want to test.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AutoCreateParentDirectories [<SwitchParameter>]

A flag that determines whether or not any missing parent directories should be created as part of this test.

For example,

if the tested path is "/Code/Drew/Notebooks" is tested with this switch parameter, and the folders "Code" and

"Drew" do not exist, they will be auto-created.

Note: this will NOT create the full target path, just any missing parent folders/directories.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Author: Drew Furgiuele (@pittfurg), http://www.port1433.com

Website: https://www.igs.com

Copyright: (c) 2019 by IGS, licensed under MIT

License: MIT https://opensource.org/licenses/MIT



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Test-AzureDatabricksWorkspacePath -Connection $Connection -Path "/users/drew"



Test for the presence of the full path of /users/drew on the Azure Databricks workspace defined in $Connection



PS C:\\> Test-AzureDatabricksWorkspacePath -Connection $Connection -Path "/users/drew" -AutoCreateParentDirectories

Test for the presence of the full path of /users/drew on the Azure Databricks workspace defined in $Connection. If

the path /users does not exist

it will be created, but the /drew path will not be created.











RELATED LINKS