Apache Airflow provider for Slate — high-throughput multi-cloud data transfers
Project description
apache-airflow-providers-slate
Apache Airflow provider for Slate — move datasets and model weights between object stores from your Airflow DAGs at 984 MB/s, 4.4× faster than aws s3 cp.
Install
pip install apache-airflow-providers-slate
Setup
Add a connection in the Airflow UI (or via env var):
Connection ID: slate_default
Connection Type: HTTP
Host: http://your-slate-api-host
Port: 3030
Or via environment variable:
AIRFLOW_CONN_SLATE_DEFAULT='{"conn_type": "http", "host": "http://localhost", "port": 3030}'
Make sure slate-api is running:
DATABASE_URL=sqlite:slate.db?mode=rwc slate-api
Usage
from airflow import DAG
from airflow.utils.dates import days_ago
from apache_airflow_providers_slate.operators.slate import SlateTransferOperator
with DAG(
dag_id="ml_data_pipeline",
schedule="@daily",
start_date=days_ago(1),
catchup=False,
) as dag:
# Ingest raw dataset from S3 to GCS staging
ingest = SlateTransferOperator(
task_id="ingest_dataset",
src="s3://raw-data/datasets/imagenet/",
dst="gs://ml-staging/datasets/imagenet/",
)
# Copy model weights to GPU node — runs after ingest
copy_weights = SlateTransferOperator(
task_id="copy_weights_to_gpu",
src="gs://ml-staging/weights/llama-3-70b/",
dst="/mnt/nvme/weights/llama-3-70b/",
priority=10, # pick up before lower-priority jobs
max_attempts=5, # retry up to 5 times
poll_interval=10.0,
)
ingest >> copy_weights
The operator returns job metadata via XCom so downstream tasks can reference it:
def use_result(**context):
result = context["ti"].xcom_pull(task_ids="ingest_dataset")
print(f"Transferred {result['bytes_transferred']} bytes")
print(f"Peak speed: {result['peak_throughput_mbps']:.1f} MB/s")
Supported stores
| URL scheme | Provider |
|---|---|
s3://bucket/prefix |
AWS S3, MinIO, Cloudflare R2 |
gs://bucket/prefix |
Google Cloud Storage |
az://container/prefix |
Azure Blob Storage |
/path or file:///path |
Local filesystem |
Any combination of source and destination works.
Operator reference
SlateTransferOperator(
task_id="...",
src="s3://...", # required
dst="gs://...", # required
slate_conn_id="slate_default", # Airflow connection ID
priority=0, # higher = picked up sooner
max_attempts=3, # retries with exponential backoff
poll_interval=5.0, # seconds between status polls
transfer_timeout=None, # raise after N seconds (None = no limit)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apache_airflow_providers_slate-0.2.0.tar.gz.
File metadata
- Download URL: apache_airflow_providers_slate-0.2.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f4a7f494ce7343cd3244916663b1f68021a006cbc4096415780b042aeeccd73
|
|
| MD5 |
03957f81840cc5e2cbe276d947631d6d
|
|
| BLAKE2b-256 |
7032644204c4d41845fe53d5b765566070541b203d4a35f9b6a6d3241d75e530
|
File details
Details for the file apache_airflow_providers_slate-0.2.0-py3-none-any.whl.
File metadata
- Download URL: apache_airflow_providers_slate-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d290e87da925efd4f2d6c133b2c09a5e91a924ffc7c10e0d76abd85a66fcbf5c
|
|
| MD5 |
e44fb5b8497a087719776169cba5fde5
|
|
| BLAKE2b-256 |
3fca151219017599a73a542bec38ef2a82d374ed1bb6741f022e67b46aa547cf
|