# Save to a Databricks Volume or workspace | DRE

> Write the file to a Unity Catalog Volume or a workspace folder, from your laptop or inside a job.

[← All use cases](https://getdre.com/#use-cases)

# Save to a Databricks Volume or workspace

The same destination works from anywhere. Outside Databricks, DRE uses the Files API and the Workspace API with your sign-in. Inside a Databricks job, the Volume and /Workspace are mounted, so DRE copies the file there directly. Workspace files are always plain files, never turned into notebooks.

Recorded from a real run against a Databricks workspace: the command, then the Volume and the workspace folder in the Databricks UI.

Recorded from a real run against a Databricks workspace: the command, then the Volume and the workspace folder in the Databricks UI.

![The Volume /Volumes/workspace/getdre\_demo/reports in Databricks Catalog Explorer, listing regions-20261001.xlsx](https://getdre.com/media/databricks_delivery/volume.webp)

The Volume in Databricks (Catalog Explorer), cropped to the file listing.

![The Workspace > Shared > getdre\_demo folder in Databricks, listing regions-20261001.xlsx as a file](https://getdre.com/media/databricks_delivery/workspace.webp)

The workspace folder: a plain file, never turned into a notebook.

profiles.yml

```yaml
destinations:
  vol_auto:
    target: dev
    targets:
      dev: &vol {type: databricks, host: "{{ env_var('DATABRICKS_HOST') }}", auth_type: auto}
      job: *vol            # in a Databricks job the volume is mounted
  ws_auto:
    target: dev
    targets:
      dev: &ws {type: databricks, host: "{{ env_var('DATABRICKS_HOST') }}", auth_type: auto}
      job: *ws
```

reports/databricks\_delivery/databricks\_delivery.yml

```yaml
queries:
  - {query: finance_regions, tab_name: By region}
output:
  format: xlsx
  columns:
    net: {format: "#,##0.00"}
  destination:
    - profile: vol_auto
      path: "/Volumes/workspace/getdre_demo/reports/regions-{{ run.date.yyyymmdd }}.xlsx"
    - profile: ws_auto
      path: "/Workspace/Shared/getdre_demo/regions-{{ run.date.yyyymmdd }}.xlsx"
```

terminal

```bash
dre run databricks_delivery
```

### What to notice

-   Sign in with OAuth, a personal access token or a service principal, or let auth\_type: auto choose.
-   Tokens and secrets stay in environment variables; DRE masks DRE\_SECRET\_\* values everywhere.
-   The same report runs on your laptop and in a Databricks job, with no change.
-   Sets can switch the sign-in per run, for example one Set per service principal.

### In the docs

-   [The databricks destination →](https://getdre.com/docs/plugins/)
