azure - 如何使用 'abfss://' uri 从命令行从存储帐户下载目录

标签 azure azure-blob-storage azcopy

ADLS/Azure Blobstore 以如下形式提供 URI

abfss://[email protected]/my-user/my-parquet.parquet

是否没有可用的工具可以简单地获取该 URI 并下载? az cli 需要将路径分解为各个部分,最终由于各种错误而无法工作。我还尝试过 azcopy copy 并遇到了一系列不同的问题。目前尚不清楚如何将 abfss URI 分解为可用于 azcopy 的路径。

最佳答案

It is not clear how to decompose the abfss URI into a path that is functional for azcopy.

您可以使用以下命令将 parquet 文件从 azure-data Lake gen2 下载到本地文件夹。

命令:

azcopy copy "https://venkat098.dfs.core.windows.net/filesystem1/test/samplepar.parquet?<SAS-token>" "C:\\Users\\Downloads\\folder1" --recursive=true

这里,

  • venkat098 = 存储帐户名称
  • filesystem1=容器
  • test/samplepar.parquet= 文件夹+文件。

您可以通过门户从您的存储帐户获取 SAS token 。

门户 -> 您的存储帐户 -> 共享访问签名 -> 检查容器和对象 -> 单击“GenerateSAS”。

enter image description here

输出:

azcopy copy "https://venkat098.dfs.core.windows.net/filesystem1/test/samplepar.parquet?<SAS-token>" "C:\\Users\\Downloads\\folder1" --recursive=true

INFO: Scanning...
INFO: azcopy.exe: A newer version 10.18.1 is available to download

INFO: Any empty folders will be processed, because source and destination both support folders

Job 1e8dffa1-b6e3-5e4e-7a07-5axxxxxx has started
Log file is located at: C:\Users\.azcopy\1e8dffa1-b6e3-5e4e-7a07-5a7d866f0c35.log

100.0 %, 1 Done, 0 Failed, 0 Pending, 0 Skipped, 1 Total,


Job 1e8dffa1-b6e3-5e4e-7a07-5xxxxxx summary
Elapsed Time (Minutes): 0.0669
Number of File Transfers: 1
Number of Folder Property Transfers: 0
Total Number of Transfers: 1
Number of Transfers Completed: 1
Number of Transfers Failed: 0
Number of Transfers Skipped: 0
TotalBytesTransferred: 113629
Final Job Status: Completed

enter image description here

下载的文件: enter image description here

关于azure - 如何使用 'abfss://' uri 从命令行从存储帐户下载目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76228434/

相关文章:

Azure DNS - 如何创建 MB 和 RP 记录?

c# - 如何从 Azure 总线服务检索所有主题?

azure - 在 Azure 开发存储上,并行上传 block blob 时收到 "the specified blob already exists"

powershell - Azure 存储 : use AzCopy. exe 将文件夹从 Blob 存储复制到另一个存储帐户

azure - 由于错误 : cannot use directory as source without --recursive or a trailing wildcard (/*),azcopy 无法执行复制命令

azure - 导出 Azure 策略豁免下的所有数据

azure - Linux 容器的虚拟应用程序和目录的替代方案

azure - Azure 逻辑应用中创建 blob 和创建 block blob 操作有什么区别?

azure - 通过 Azure 上的 Blob 存储托管的根域静态网站?

azure - 使用 AZ 副本将文件从 Azure VM 传输到 Blob 容器