Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
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:
Steps:
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
Login to Azure: Open Command Prompt or PowerShell and log in to your Azure account using:
az login
Follow the instructions to authenticate.
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:
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.
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.