Skip to content

Shared Files

Shared Files is a persistent, workspace-wide place to store files that your Dags read and write. Think of it as a shared folder for the workspace — similar to a bucket — but you use it as a normal filesystem from inside a Dag.

What it is for

  • reference data and lookup files;
  • model artifacts and intermediate outputs;
  • configuration and small datasets shared by several Dags;
  • files you want to edit in Forge and reuse across runs.

Open it

In the product, open Forge → Shared files. You can create, edit and delete files there. Saved files are versioned, so you can see the history and restore an earlier version.

Read and write from a Dag

Every task sees the workspace's shared folder at:

/opt/airflow/packages/shared-data/<workspace>

Replace <workspace> with your workspace slug.

from pathlib import Path

shared = Path("/opt/airflow/packages/shared-data/<workspace>")
shared.mkdir(parents=True, exist_ok=True)

(shared / "customers.json").write_text('{"count": 3}')

Any task in the workspace can read the same file.

What persists

  • Files stay after the run finishes.
  • Files are shared by every Dag in the workspace.
  • Files saved in Forge are versioned. Files written by a Dag persist but are not committed to history automatically.

Limits and notes

  • Shared Files is workspace-scoped. Another workspace cannot read it.
  • It is a shared filesystem, not an S3 API. Use your object store for large data.
  • It is not a database or a warehouse. Use it for small files and artifacts.
  • If several tasks write at once, use unique file names and write to a temporary file before renaming it.
  • Forge — edit and version shared files.
  • Dags — read and write the files.
  • Packages — install libraries your Dags import.