我已通过 azure 门户创建了 Azure Data Lake Storage Gen2 帐户。如何通过 C# 代码在该帐户中创建文件。我用谷歌搜索了很多,但没有找到任何示例。
更新1:
为了调用 REST api,我尝试使用下面的代码生成 token ,但出现问题。您能否发布一些示例代码或在出现问题时纠正我。
问题:
AADSTS90002: Tenant 'token' not found. This may happen if there are no active subscriptions for the tenant. Check with your subscription administrator.
更新2:
我也使用下面的代码来创建文件,但它抛出错误。
最佳答案
目前ADSL gen2暂不支持SDK,查看文档:Known issues with Azure Data Lake Storage Gen2 .
Blob storage APIs are disabled to prevent feature operability issues that could arise because Blob Storage APIs aren't yet interoperable with Azure Data Lake Gen2 APIs.
但是您仍然可以使用 ADSL REST API ,进行创建、删除操作。
<小时/>更新:目前,github上有一个非官方的sdk,也许你可以尝试一下。它是通过 REST API 实现的,这是 github 链接:AzureDataLakeGen2-SDK .
关于c# - 如何创建文件或将文件上传到 Azure Data Lake Storage Gen2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56864635/