< Back

Export-AzureDatabricksContent

Sun Jan 19, 2020 6:06 pm

NAME Export-AzureDatabricksContent



SYNOPSIS

Exports the contents of a Databricks workspace.





SYNTAX

Export-AzureDatabricksContent [-Connection] <Object> [-Path] <String> [[-ToFile] <FileInfo>] [<CommonParameters>]





DESCRIPTION

This function is designed to make it easier to export the raw contents of an Azure Databricks workspace to either

an byte array object the represents

the raw contents of the directory, or to an actual archive file you can save to your local file system.





PARAMETERS

-Connection <Object>

An object that represents an Azure Databricks API connection where you want to get your workspace files from.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

The base path you want to copy your files from. Note: this will recurseively copy everything in the given path.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ToFile <FileInfo>

An object that represents a target file on your local file system. If supplied, the raw bytes will be written

to disk in the form on archive you can open (.zip file).



Required? false

Position? 3

Default value

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:\\>$Contents = Export-AzureDatabricksContent -Connection $AzureDatabricksConnection -Path "/SomeDirectory"



Returns an object representing the raw bytes of the contents of the /SomeDirectory folder on the Azure Databricks

instance defined in $AzureDatabricksConnection









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Export-AzureDatabricksContent -Connection $AzureDatabricksConnection -Path "/SomeDirectory" -ToFile

Archive.zip



Saves the contents of the /SomeDirectory folder on the Azure Databricks instance defined in

$AzureDatabricksConnection to a local file in your current working folder

in a file named Archive.zip.











RELATED LINKS