Skip to content

Azure Blob Storage Data Source

Load data from Azure Blob Storage.

We can load data by using two different types of authentication methods:

azure_blob

2. Service Principal Authentication Mechanism

Section titled “2. Service Principal Authentication Mechanism”

azure_blob

azure_blob

from llama_cloud.types.data_source_create_params import (
CloudAzStorageBlobDataSource,
)
data_source = client.data_sources.create(
name="my-data-source",
component=CloudAzStorageBlobDataSource(
container_name='<container_name>',
account_url='<account_url>',
blob='<blob>', # optional
prefix='<prefix>', # optional
account_name='<account_name>',
account_key='<account_key>',
),
source_type="AZURE_STORAGE_BLOB",
project_id="my-project-id",
)

2. Service Principal Authentication Mechanism

Section titled “2. Service Principal Authentication Mechanism”
from llama_cloud.types.data_source_create_params import (
CloudAzStorageBlobDataSource,
)
data_source = client.data_sources.create(
name="my-data-source",
component=CloudAzStorageBlobDataSource(
container_name='<container_name>',
account_url='<account_url>',
blob='<blob>', # optional
prefix='<prefix>', # optional
client_id='<client_id>',
client_secret='<client_secret>',
tenant_id='<tenant_id>',
),
source_type="AZURE_STORAGE_BLOB",
project_id="my-project-id",
)
from llama_cloud.types.data_source_create_params import (
CloudAzStorageBlobDataSource,
)
data_source = client.data_sources.create(
name="my-data-source",
component=CloudAzStorageBlobDataSource(
container_name='<container_name>',
account_url='<account_url>/?<SAS_TOKEN>',
blob='<blob>', # optional
prefix='<prefix>', # optional
),
source_type="AZURE_STORAGE_BLOB",
project_id="my-project-id",
)