How To Create Azure Data Lake Storage Gen2

Azure Data Lake Storage Gen2 is a powerful solution that helps address your significant data analytics needs. As an Azure cloud architect, I helped create Azure Data Lake Storage Gen2 accounts for many clients. In this article, I will guide you through some straightforward approaches to accomplishing this task.

How To Create Azure Data Lake Storage Gen2

Before we begin, let me outline the prerequisites required here.

Prerequisites

You must have an Azure subscription. If you haven’t already done so, you can create a free Azure account now.

Assuming you are ready with the prerequisites, let us start with each approach individually.

Approach-1: Using Azure Portal

To create Azure Data Lake Storage Gen2, follow the steps below.

1. Log in to the Azure Portal.

2. Search for the Storage accounts and click on the search result Storage accounts as below.

create azure data lake storage gen2

3. Click on the +Create button as shown below.

azure data lake storage gen2 architecture

4. In the Create a Storage Account window, on the Basics tab, fill in the details below.

  • Subscription: Select the appropriate subscription.
  • Resource Group: You can select an existing resource group or click on the Create new link to create a new one.
  • Storage account name: Enter a unique name for the storage account.
  • Region: Select your preferred location.
  • Primary service: Choose Azure Blob Storage or Azure Data Lake Storage Gen 2.
  • Performance: Choose Standard or Premium based on your requirements.
  • Redundancy: Select GRS, LRS, etc, based on your requirement.

Now, click on the Next button to navigate to the advanced tab. For better clarity, refer to the screenshot below.

How To Create Azure Data Lake Storage Gen2

On the Advanced tab, ensure that you select the Enable hierarchical namespace option, as highlighted in the screenshot below.

How To Create Azure Data Lake Gen2 Storage account

Keep all other default options as they are, and now click on the Review + Create button.

Finally, click the Create button on the next window, as shown in the screenshot below.

how to create azure data lake storage gen2 account

The Azure Data Lake Storage Gen2 account has been created successfully, as shown in the screenshot below. Click the Go to Resource button to navigate to the account we created above.

how to access azure data lake storage gen2

Check out Azure Storage Account Key

Approach-2: Using PowerShell

We can execute the following PowerShell command to create an Azure Data Lake Storage Gen2.

$resourceGroupName = 'MyNewResGrp'
$storageAccountName = 'usasa'
$location = 'East US'

New-AzStorageAccount `
    -ResourceGroupName $resourceGroupName `
    -Name $storageAccountName `
    -Location $location `
    -SkuName "Standard_LRS" `
    -Kind "StorageV2" `
    -EnableHierarchicalNamespace $true

After executing the PowerShell script above, I got the expected output, as shown below. The account has been created successfully.

How to create azure data lake storage account gen2

To cross-check, I logged in to the Azure Portal and saw that the account had been created successfully, as shown in the screenshot below.

Create Azure Data Lake Storage Gen2 account

Check out how to enable Azure Storage Account Public Access

Approach-3 Using Azure CLI

Using the script below, we can also use the Azure CLI script to achieve this.

az storage account create --name newworksa --resource-group MyNewResGrp --location Eastus --sku Standard_LRS --kind StorageV2 --enable-hierarchical-namespace true

After executing the above script, I got the expected output, shown in the screenshot below.

how to create azure data lake gen 2

To cross-check again, I logged in to the Azure Portal and saw that the account had been created successfully. Please refer to the screenshot below for your reference.

create azure data lake gen 2

Video Tutorial

Conclusion

Creating Azure Data Lake Storage Gen2 is crucial when dealing with big data analytics needs. You can use Azure Portal, PowerShell, and Azure CLI to achieve this. Based on your requirements, you can select the most suitable approach.

You may also like the following articles.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!