Upload data from Local Filesystem to Azure Blob Storage

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. This page shows how to upload data from local filesystem to Azure Blob Storage.

LocalFilesystemToWasbOperator

LocalFilesystemToWasbOperator allows you to upload data from local filesystem to Azure Blob Storage.

Below is an example of using this operator to upload a file to Azure Blob Storage.

tests/system/microsoft/azure/example_local_to_wasb.py[source]

    upload = LocalFilesystemToWasbOperator(
        task_id="upload_file",
        file_path=PATH_TO_UPLOAD_FILE,
        container_name=AZURE_CONTAINER_NAME,
        blob_name=AZURE_BLOB_NAME,
    )

Reference

For further information, look at:

Was this entry helpful?