Foundation

Modern Orchestrators: Dagster & Prefect

Dagster and Prefect -- with over 16,000 and 24,000 GitHub stars respectively -- were purpose-built to replace Airflow's task-centric model with an asset-centric approach that exposes data lineage and supports first-class testing.

Published by How to Train Your Data

Last updated: 2026-10-26

Sources

Best resources to learn Modern Orchestrators: Dagster & Prefect

Dagster and Prefect were built to fix Airflow's pain points: poor testability, a task-centric model that obscures data lineage, and a heavyweight scheduler that struggles at scale. Both have earned significant community traction: Dagster has over 16,000 GitHub stars and Prefect has over 24,000 GitHub stars, according to their respective GitHub repositories. Both are worth evaluating for greenfield projects.

Dagster's asset-centric model is the bigger conceptual shift. Instead of tasks, you define software-defined assets -- data artifacts with lineage, freshness policies, and materialization history. This model aligns better with how data teams think about pipelines and enables features like partial re-materialization. Prefect takes a lighter-weight approach with a Python-native API and a hybrid execution model (cloud orchestration with local workers) that requires less infrastructure to operate.

Learning map

Stage 1: Describe the work as data products

Learn the shift from scheduling tasks to expressing the data products a pipeline creates, their dependencies, and how an operator can inspect those relationships.

Stage 2: Make one pipeline locally observable

Build a small repeatable pipeline and follow one run from input through transformation to output. Keep local setup and production deployment as separate decisions.

Stage 3: Add failure and change checks

Treat retries, validation, and backfills as part of pipeline design. A green run is useful only when its output also satisfies the consumer contract.

Stage 4: Choose for your operating model

Select an orchestrator against the workflow your team will own, including its deployment boundary, existing platform, and operational responsibilities.

Get hands-on: step by step

  1. Choose one observable output

    Pick a pipeline that transforms a small file or table and name its final output. Write down what a correct output looks like and where a teammate should be able to inspect it. Keep the first exercise local; it should teach the framework model without introducing cloud credentials or production data.

  2. Scaffold a Dagster project from its quickstart

    Follow Dagster's current quickstart for prerequisites and project creation. Its documented command is shown below. Keep the generated project separate from any production repository while learning, then add a small fixture and define one asset that turns it into a second file.

    uvx create-dagster@latest project dagster-quickstart
  3. Inspect asset definitions and dependencies

    Use the quickstart's asset example as a reference, then list the project definitions with the documented CLI command. Find the asset in the output and trace its input and output names back to the code. If a pipeline has several outputs, sketch their dependencies before adding more logic.

    dg list defs
  4. Run and verify the Dagster result

    Start the local development interface as described by the quickstart, materialize the asset, and inspect its run. Verify the resulting file directly as the guide demonstrates. A readable output file gives you a simple way to separate orchestration behavior from assumptions hidden in a dashboard.

    dg dev
  5. Express the same work as a Prefect flow

    In a separate scratch project with Prefect installed according to its official setup guide, wrap the same small transformation in a flow. Prefect documents calling the decorated function like an ordinary Python function; begin there, then decide which functions deserve task boundaries. Avoid adding remote workers until you have a clear deployment requirement.

    from prefect import flow
    
    @flow
    def transform_fixture():
        return "inspect this result"
    
    transform_fixture()
  6. Compare the run records and write a decision note

    Run both local examples with the same fixture. Compare how each represents dependencies, outputs, retries, logs, and the work required to operate a scheduled deployment. Record one reason to keep the existing tool and one requirement that could justify a migration. Link the note to a real pipeline so the comparison stays grounded in team work.

  7. Review the migration boundary with the operators

    Ask the people who support the current scheduler to review the proposed pipeline and identify the operational work a prototype left out. Discuss deployment packaging, secrets, permissions, schedules, alert routing, backfills, and ownership during an incident. Confirm which concerns belong to the orchestrator and which belong to the surrounding platform. Update the decision note with concrete examples from an existing workflow, a migration sequence that can be reversed, and a way to compare reliability after rollout. A framework demo is evidence about authoring and local execution; the operating plan is separate evidence about whether the team can run it. Keep both in view before proposing a production migration. Repeat the review after the first production workflow has run and revise the assumptions using actual run history and support work.

Recommended courses

Some course links above are affiliate links. If you enroll, we may earn a small commission at no extra cost to you.

Related topics

More in foundations

Stay current on AI data engineering

New resources and perspective on building AI-ready data systems, a few times a month. No spam.