Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Download Files from Azure Data Lake Storage using az dls fs on Windows

Azure Data Lake Storage (ADLS) is a highly scalable and secure data lake for high-performance analytics workloads. The az dls fs download command is used to download files from ADLS. However, this command is part of the Azure CLI, which is cross-platform and can be used on Windows. This article will guide you through the process of downloading files from ADLS using the Azure CLI on a Windows environment.

Prerequisites:

  1. Azure CLI installed on your Windows machine.
  2. Proper authentication to access your Azure account.
  3. Necessary permissions to access the Data Lake Storage.

Steps:

  1. Install Azure CLI: If you haven't installed the Azure CLI, you can download and install it from the official Azure CLI installation page.

    Alternatively, you can use the following PowerShell command to install it:

    Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -ArgumentList '/I AzureCLI.msi /quiet' -Wait
  2. Login to Azure: Open Command Prompt or PowerShell and log in to your Azure account using:

    az login

    Follow the instructions to authenticate.

  3. Download Files from ADLS: Use the az dls fs download command to download files from your Data Lake Storage. Here is an example:

    az dls fs download --account <YourDataLakeAccountName> --source-path /path/to/remote/file --destination-path C:\path\to\local\directory

    Replace <YourDataLakeAccountName>, /path/to/remote/file, and C:\path\to\local\directory with your actual Data Lake account name, the path of the file in ADLS, and the local directory path where you want to download the file, respectively.

Examples:

  1. Example 1: Download a single file:

    az dls fs download --account mydatalakeaccount --source-path /data/sample.txt --destination-path C:\Users\YourUsername\Downloads\sample.txt

    This command downloads the file sample.txt from the data directory in your Data Lake Storage to the Downloads folder on your local machine.

  2. Example 2: Download a directory:

    az dls fs download --account mydatalakeaccount --source-path /data/ --destination-path C:\Users\YourUsername\Downloads\data --recursive

    Adding the --recursive flag allows you to download all files within the data directory and its subdirectories.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.