Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.unstructured.io/llms.txt

Use this file to discover all available pages before exploring further.

First time creating a connector? Read this first.
Send processed data from Unstructured to Azure Blob Storage.

Requirements

You will need: The following video shows how to fulfill the minimum set of Azure Storage account requirements:
If you are generating an SAS token as shown in the preceding video, be sure to set the following permissions:
  • Read and List for reading from the container only.
  • Write and List for writing to the container only.
  • Read, Write, and List for both reading from and writing to the container.
Here are some more details about these requirements:
  • An Azure account. To create one, learn how.
  • An Azure Storage account, and a container within that account. Create a storage account. Create a container.
  • The Azure Storage remote URL, using the format az://<container-name>/<path/to/file/or/folder/in/container/as/needed> For example, if your container is named my-container, and there is a folder in the container named my-folder, the Azure Storage remote URL would be az://my-container/my-folder/.
  • An SAS token (recommended), access key, or connection string for the Azure Storage account. Create an SAS token (recommended). Get an access key. Get a connection string. Create an SAS token (recommended):
    Get an access key or connection string:

Examples

To create an Azure Blob Storage destination connector, see the following examples. For more information on working with destination connectors using the Unstructured API, see Destination endpoints.
import os

from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import CreateDestinationRequest
from unstructured_client.models.shared import CreateDestinationConnector

with UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY")) as client:
    response = client.sources.create_destination(
        request=CreateDestinationRequest(
            create_destination_connector=CreateDestinationConnector(
                name="<name>",
                type="azure",
                config={
                    "remote_url": "az://<container-name>/<path/to/file/or/folder>",
                    
                    # For SAS token authentication:
                    # "account_name": "<account-name>",
                    # "sas_token": "<sas-token>",

                    # For account key authentication:
                    # "account_name": "<account-name>",
                    # "account_key": "<account-key>",

                    # For connection string authentication:
                    # "connection_string": "<connection-string>"
                }
            )
        )
    )

    print(response.destination_connector_information)

Configuration settings

Replace the preceding placeholders as follows:
name
string
required
A unique name for this connector.
remote_url
string
required
The Azure Storage remote URL, with the format az://<container-name>/<path/to/file/or/folder/in/container/as/needed>. For example, if your container is named my-container, and there is a folder in the container named my-folder, the Azure Storage remote URL would be az://my-container/my-folder/.
account_name
string
The Azure Storage account name. Required for SAS token authentication and account key authentication.
sas_token
string
required
For SAS token authentication, the SAS token for the Azure Storage account.
account_key
string
required
For account key authentication, the key for the Azure Storage account.
connection_string
string
required
For connection string authentication, the connection string for the Azure Storage account.
recursive
boolean
default:"false"
Source connector only. Set to true to recursively access files from subfolders within the container.