I want to replace my blob storage with the ADLS Gen 2 functionality in Azure. Point is, I upload a batch of files in a build pipeline with the following command to a certain container in Blob:
az storage blob upload-batch
--destination "storage-container-files"
--account-name "accountname"
--source "./files"
This works perfectly fine. Now I want to do the same thing but then to Gen2 datalake, for which I have to use the az storage blob ....
command. However I cannot find something similar to ‘upload-batch’, only single file upload commands. I would like not having to loop in the yaml or in a Python script.
Is there any simple way to batch upload like I could with blob?
2
Answers
We don’t have any cmdlet to upload a batch of file (set of files) for ADLS gen2 Account.
We have
az storage fs file upload
cmdlet to upload a single file only.I would suggest you use AZCOPY.exe to upload bulk of files to your adls gen 2 storage account.For additional information, you can refer to these below links:
Sure, there is:
This is my repo structure:
And successfully:
Refer to this:
https://learn.microsoft.com/en-us/cli/azure/storage/fs/directory?view=azure-cli-latest#az-storage-fs-directory-upload