Mirit
Mirit

Reputation: 33

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?

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?

Upvotes: 0

Views: 1014

Answers (2)

focode
focode

Reputation: 716

I know it's late to answer this question but I was able to create an empty folder using cli

  1. 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>

the service principal should have valid scops and use the latest 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>"
}

Upvotes: 0

George Chen
George Chen

Reputation: 14324

You could know the tools limits for now is not supported from this doc: Programming interfaces and this Known issues.

enter image description here

enter image description here

Fro now the tools you could use:

  1. AzCopy v10(Earlier versions of AzCopy such as AzCopy v8.1, are not supported)
  2. Azure Storage Explorer
  3. Azure Data Lake Store REST API

Upvotes: 1

Related Questions