我们能否使用Azure CLI将文件上传到Azure Data Lake Storage Gen2 [英] Can we use Azure CLI to upload files to Azure Data Lake Storage Gen2

查看:148
本文介绍了我们能否使用Azure CLI将文件上传到Azure Data Lake Storage Gen2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要做的就是使用Azure CLI(通过`命令)将文件从原始文件上传到Azure Data Lake Storage Gen2 ,但是出现连接错误! 我可以使用Azure CLI来做到这一点吗?还是我必须使用其他工具? PS:我无法使用Azure数据工厂,我希望我的工作从最初开始而不是从云开始! ks.

All I want to do, is to upload files from on prime to Azure Data Lake Storage Gen2 using the Azure CLI (via ` command), but have a connection error! Can I use Azure CLI to to that? Or I have to use another tool? PS: I cannot use Azure Data Factory, I want my job running from my on prime and not from the cloud! Thks.

azure.datalake.store.exceptions.DatalakeRESTException:  HTTP error: 
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='storageAccount.azuredatalakestore.net', port=443): 
Max retries exceeded with url: /webhdfs/v1/my-file-system/data.csv?OP=GETFILESTATUS&api-version=2018-05-01 
(Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fc7ed169c50>: 
Failed to establish a new connection: [Errno -2] Name or service not known')

推荐答案

否,不存在用于gen2文件系统的Azure CLI,请参见此

No, Azure CLI for gen2 filesystem is not available, see this link.

如果要上传文件,请参考以下两种解决方法.

If you want to upload file, here are two workarounds for you to refer.

  1. 使用 Azure Storage Explorer

使用 AzCopy v10 ,请注意,只有v10支持Azure Data Lake Storage Gen2 API.使用myaccount.dfs.core.windows.net作为URI来调用ADLS Gen2 API.

Use AzCopy v10, note only v10 supports Azure Data Lake Storage Gen2 APIs. Use myaccount.dfs.core.windows.net as a URI to call the ADLS Gen2 APIs.

这篇关于我们能否使用Azure CLI将文件上传到Azure Data Lake Storage Gen2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆