Dagster is an orchestration platform for the development, production, and observation of data assets.
Actively maintained. Last release 11 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install dagsterDagster is a cloud-native data pipeline orchestrator for the whole development lifecycle, with integrated lineage and observability, a declarative programming model, and best-in-class testability.
It is designed for developing and maintaining data assets, such as tables, data sets, machine learning models, and reports.
With Dagster, you declare—as Python functions—the data assets that you want to build. Dagster then helps you run your functions at the right time and keep your assets up-to-date.
Here is an example of a graph of three assets defined in Python:
import dagster as dg
import pandas as pd
from sklearn.linear_model import LinearRegression
@dg.asset
def country_populations() -> pd.DataFrame:
df = pd.read_html("https://tinyurl.com/mry64ebh")[0]
df.columns = ["country", "pop2022", "pop2023", "change", "continent", "region"]
df["change"] = df["change"].str.rstrip("%").astype("float")
return df
@dg.asset
def continent_change_model(country_populations: pd.DataFrame) -> LinearRegression:
data = country_populations.dropna(subset=["change"])
return LinearRegression().fit(pd.get_dummies(data[["continent"]]), data["change"])
@dg.asset
def continent_stats(
country_populations: pd.DataFrame, continent_change_model: LinearRegression
) -> pd.DataFrame:
result = country_populations.groupby("continent").sum()
result["pop_change_factor"] = continent_change_model.coef_
return result