c# - 如何创建文件或将文件上传到 Azure Data Lake Storage Gen2

标签 c# .net azure azure-data-lake

我已通过 azure 门户创建了 Azure Data Lake Storage Gen2 帐户。如何通过 C# 代码在该帐户中创建文件。我用谷歌搜索了很多,但没有找到任何示例。

更新1:

为了调用 REST api,我尝试使用下面的代码生成 token ,但出现问题。您能否发布一些示例代码或在出现问题时纠正我。

enter image description here

问题:

AADSTS90002: Tenant 'token' not found. This may happen if there are no active subscriptions for the tenant. Check with your subscription administrator.

更新2:

我也使用下面的代码来创建文件,但它抛出错误。

enter image description here

enter image description here

最佳答案

目前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/

相关文章:

c# - 在 foreach(单词中的字符串单词)中,如果 (if->true) C#,我如何转到下一个单词?

azure - 为什么这个零结果 Cosmos DB 查询如此昂贵?

wordpress - 如何将 Nginx 配置为仅为 Azure 应用服务上的 WordPress 提供 https 服务

c# - 为什么 Gridview 页脚要添加一个额外的列?

c# - 可空引用类型 : "Try" method pattern, 在返回 false 时收到 null 警告

c# - 如何在虚拟模式下以编程方式编辑 datagridview 的单元格值?

c# - NUnit 的一次性初始化

c# - 为什么这个 "finally"会执行呢?

c# - 并行执行任务

azure - 使用 Rest-API 在 ADLS Gen2 中更新文件时出现问题