简体   繁体   English

使用 Azure CLI 在 Azure DataLake gen 2 中创建文件夹

[英]Creating folders in Azure DataLake gen 2 with Azure CLI

Is it possible to create a folder in Azure DataLake gen 2 with Azure CLI?是否可以使用 Azure CLI 在 Azure DataLake gen 2 中创建文件夹?

Something like with this code:类似于此代码:

dls fs create --account my-storage-account --folder  --path my-folder

Or are there some other tools which could help to automate creation of DataLake gen2 with folders and role assignments?或者是否有其他一些工具可以帮助自动创建带有文件夹和角色分配的 DataLake gen2?

You could know the tools limits for now is not supported from this doc: Programming interfaces and this Known issues .您可以从这个文档中知道目前不支持工具限制: 编程接口和这个已知问题

在此处输入图片说明

在此处输入图片说明

Fro now the tools you could use:现在你可以使用的工具:

  1. AzCopy v10 (Earlier versions of AzCopy such as AzCopy v8.1, are not supported) AzCopy v10 (不支持早期版本的 AzCopy,例如 AzCopy v8.1)
  2. Azure Storage Explorer Azure 存储资源管理器
  3. Azure Data Lake Store REST API Azure 数据湖存储 REST API

I know it's late to answer this question but I was able to create an empty folder using cli我知道现在回答这个问题为时已晚,但我能够使用 cli 创建一个空文件夹

  1. az login --service-principal --username --password --tenant az login --service-principal --username --password --tenant
  2. az storage fs directory create -n <name_of_folder_to_be_created> -f <container_name>/ --account-name <account_name> az storage fs directory create -n <name_of_folder_to_be_created> -f <container_name>/ --account-name <account_name>

the service principal should have valid scops and use the latest az CLI服务主体应具有有效的范围并使用最新的 az CLI

output was:输出是:

{
  "content_length": 0,
  "continuation": null,
  "date": "<removed>",
  "etag": "\"<removed>\"",
  "last_modified": "2021-05-11T18:32:03+00:00",
  "request_id": "<removed>",
  "version": "<removed>"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM