SFTP to Azure Blob Storage Transfer Operator¶
The Blob service stores text and binary data as objects in the cloud. The Blob service offers the following three resources: the storage account, containers, and blobs. Within your storage account, containers provide a way to organize sets of blobs. For more information about the service visit Azure Blob Storage API documentation.
Before you begin¶
Before using Blob Storage within Airflow you need to authenticate your account with Token, Login and Password. Please follow Azure instructions to do it.
See following example. Set values for these fields:
SFTP Conn Id: sftp_default
WASB Conn Id: wasb_default
Transfer Data from SFTP Source Path to Blob Storage¶
Operator transfers data from SFTP Source Path to specified container in Azure Blob Storage
To get information about jobs within a Azure Blob Storage use:
SFTPToWasbOperator
Example usage:
transfer_files_to_azure = SFTPToWasbOperator(
task_id="transfer_files_from_sftp_to_wasb",
# SFTP args
sftp_source_path=SFTP_SRC_PATH,
# AZURE args
container_name=AZURE_CONTAINER_NAME,
blob_prefix=BLOB_PREFIX,
)