# Azure Blob Storage | DRE

> The azure_blob destination: credentials and paths.

You're reading the docs for DRE 0.4 (v0.4.4). [This page for 0.5](https://getdre.com/docs/plugin-azure_blob/) · [New in 0.5](https://getdre.com/docs/new-in-0.5/)

# Azure Blob Storage

Amazon S3 (and S3-compatible), Google Cloud Storage and Azure Blob Storage: the `azure_blob` destination, from the `object_store` package. Declare the package once in `dependencies.yml`; DRE installs it on demand:

dependencies.yml

```yaml
plugins:
  - object_store
```

### Profile fields

Set in `profiles.yml`, under `destinations:`, in a target with `type: azure_blob`.

Field

Default

Notes

`account_name`

Storage account name.

`container`

Default container (or use az://container/… paths)

`connection_string`

Connection string (or set sas\_token / access\_key) Secret: use `env_var()`.

`sas_token`

A SAS token. Secret: use `env_var()`.

`access_key`

The account’s access key. Secret: use `env_var()`.

`use_managed_identity`

Sign in as the machine’s managed identity.

`use_azure_cli`

Sign in with the `az login` session.

`endpoint`

An emulator’s URL.

`connect_timeout`

`30s`

How long to wait for a connection (`30s`, `2m`, or seconds) A duration (`30s`, `2m`) or seconds.

`timeout`

`60s`

How long a read or write may make no progress before it fails. A duration (`30s`, `2m`) or seconds.

`retries`

`3`

How many times to try again after a temporary error (0: never)

### Options

Set in the report’s `output.destination` entry.

Option

Type

Default

Notes

`if_exists`

string

`overwrite`

When a file is already at the path: `overwrite` it, fail with `error`, or `number` the new one. One of `overwrite`, `error`, `number`.

## Notes

`account_name`, `container`, and one of `connection_string`, `sas_token`, `access_key`, `use_managed_identity` (true), or `use_azure_cli` (true: the `az login` session). `endpoint` is for emulators. Paths are `az://container/key`. Takes `if_exists` (see [A file already at the path](https://getdre.com/docs/v0.4/plugins/#a-file-already-at-the-path)).

## Archive a workbook with an Azure identity

Use Azure Blob for report files alongside Azure data. For local work after `az login`, add:

profiles.yml

```yaml
destinations:
  archive:
    targets:
      dev: {deliver: false}
      prod:
        type: azure_blob
        account_name: financereports
        container: monthly
        use_azure_cli: true
```

```yaml
# within the monthly finance report's output
destination:
  profile: archive
  path: "az://monthly/{{ run.date.yyyymm }}.xlsx"
  if_exists: error
```

Adapt the complete [monthly finance example](https://github.com/get-dre/dre/blob/v0.4.4/examples/monthly-finance/) and preview before delivery. On an Azure runner, use `use_managed_identity: true` instead of a local CLI session. Choose one authentication method; do not combine it with account keys or a connection string. `azure_blob/file-exists` means a previous delivery owns the path; `delivery-failed` with denied access needs storage permissions for the chosen identity. The account and container must already exist. See [destination keys](https://getdre.com/docs/v0.4/reference-report/#outputdestination), [delivery behavior](https://getdre.com/docs/v0.4/plugins/#destinations) and [destination](https://getdre.com/docs/v0.4/glossary/#destination).

[Previous  
Orchestration recipe](https://getdre.com/docs/v0.4/orchestration/)[Next  
BigQuery](https://getdre.com/docs/v0.4/plugin-bigquery/)
