Creating folder in blob container

Joshi, Dipika 1 Reputation point
2020-07-14T15:18:17.263+00:00

I have an azure storage account lets say: dev1
within this storage account I have a blob container called : finance
Now i want to create empty folders in 'finance' container without any file in them example :

/finance/raw/cs1
/finance/cuarted/cs2

how do i achieve this. I see multiple options and am confused which of them i can use:

REST API: Can i use REST API for ADLS Gen2 Path for creating these sub folders?

https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create
Is PATH same as sub folders of container?

Can i use azure sdk java for blob services for creating these sub folders

https://github.com/Azure/azure-sdk-for-java/tree/azure-storage-blob_12.0.0/sdk/storage/azure-storage-blob

Or is there any other REST API/ Java SDK that i can use to achieve subfolder creation in Azure blob container.

Please Help!!

Thanks

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,479 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. HarithaMaddi-MSFT 10,136 Reputation points
    2020-07-15T14:01:19.647+00:00

    Hi @JoshiDipika-7103,

    Thanks for posting the question. Various approaches (REST API, SDK, Python, AzCopy) are available for achieving this and any option can be considered as per the skill set used in the project to enable ease of use. This URL provides recommended approach for creating subfolder in ADLS using Java SDK.

    For faster access and upload of files, please use AzCopy approach

    Best practices while using ADLS gen2 can be found from this URL

    Hope this helps!


  2. Aditya Garg 61 Reputation points
    2022-11-03T19:45:55.16+00:00

    I think there is a way to create folders(directory) inside a container:
    256971-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.