Apache Airflow scheduler adapter for Datus
Project description
datus-scheduler-airflow
Apache Airflow scheduler adapter for Datus.
Install
pip install datus-scheduler-airflow
Quick Start
from datus_airflow import AirflowSchedulerAdapter
from datus_scheduler_core.config import AirflowConfig
from datus_scheduler_core.models import SchedulerJobPayload
config = AirflowConfig(
name="airflow_prod",
type="airflow",
api_base_url="http://localhost:8080/api/v1",
username="admin",
password="admin",
dags_folder="/opt/airflow/dags",
)
adapter = AirflowSchedulerAdapter(config)
adapter.test_connection()
job = adapter.submit_job(SchedulerJobPayload(
job_name="daily_report",
sql="SELECT count(*) FROM orders",
db_connection={"url": "postgresql://user:pass@host/db"},
schedule="0 8 * * *",
))
print(job.job_id)
Integration Tests
# Start Airflow (docker-compose lives next to the tests)
cd tests/integration
docker compose up -d
cd ../..
# Run tests (from the workspace root; AIRFLOW_PASSWORD matches
# _AIRFLOW_WWW_USER_PASSWORD in tests/integration/docker-compose.yml)
AIRFLOW_PASSWORD=admin uv run pytest tests/integration/ -v -m integration
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 datus_scheduler_airflow-0.1.1.tar.gz.
File metadata
- Download URL: datus_scheduler_airflow-0.1.1.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1471966900c894733c79fc6f7047dace2416aa893e8b82188ce5d1544de08952
|
|
| MD5 |
08905ac8a7e5105c5f7cdffce03c1751
|
|
| BLAKE2b-256 |
ca06c4ab1749a12ac62efbe2a3723b362ef1d7b96ae020645e1f3df10cafd32b
|
File details
Details for the file datus_scheduler_airflow-0.1.1-py3-none-any.whl.
File metadata
- Download URL: datus_scheduler_airflow-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2217337606afa0947cf4bcf479a122d9e27561826fd0d9c6ee3f8365dd1a2d3c
|
|
| MD5 |
443c3ff335f3f631b43d83c7d44f870b
|
|
| BLAKE2b-256 |
fc59fe5b10a2c6c02642ea9db18c69817c122ded55a27ca108bcce2bef7bcb84
|