作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想用 Azure 中的 ADLS Gen 2 功能替换我的 Blob 存储。要点是,我使用以下命令将构建管道中的一批文件上传到 Blob 中的某个容器:
az storage blob upload-batch \
--destination "storage-container-files" \
--account-name "accountname" \
--source "./files"
这工作得很好。现在我想做同样的事情,但是对于 Gen2 datalake,我必须使用 az storage blob ....
命令。但是我找不到类似于“upload-batch”的东西,只有单个文件上传命令。我希望不必在 yaml 或 Python 脚本中循环。
是否有任何简单的方法可以像使用 blob 那样批量上传?
最佳答案
当然有:
trigger:
- none
pool:
vmImage: ubuntu-latest
steps:
- task: AzureCLI@2
inputs:
azureSubscription: 'testbowman_in_AAD'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az storage fs directory upload -f xxx/dir --account-name bowmantest -s "files" --recursive --connection-string "xxx"
这是我的 repo 结构:
并成功:
引用这个:
Upload files or subdirectories to a directory in ADLS Gen2 filesystem.
关于azure - 有什么方法可以将一组文件批量上传到 ADLS gen2 存储吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73621746/
我是一名优秀的程序员,十分优秀!