Dagster

1.12.22 · active · verified Thu Apr 09

Dagster is an orchestration platform designed for the development, production, and observation of data assets. It emphasizes defining pipelines as data assets and provides a rich development experience with built-in UI and testing capabilities. The library is actively maintained with frequent minor releases, often on a weekly basis, incorporating new features, bug fixes, and improvements.

Warnings

Install

Imports

Quickstart

This quickstart defines a simple asset and a job that materializes it. It includes a directly runnable Python snippet to execute the asset in memory. For local development with the full Dagster UI (Dagit), save the commented `Definitions` block to a file and run `dagster dev`.

from dagster import Definitions, asset, job

@asset
def my_first_asset():
    """A simple asset that prints a message and returns a string."""
    print("Hello, Dagster!")
    return "hello"

@job
def my_asset_job():
    my_first_asset()

# To run this locally and see the output immediately:
if __name__ == "__main__":
    from dagster import materialize_to_memory
    result = materialize_to_memory(assets=[my_first_asset])
    assert result.success
    print(f"Asset output: {result.output_for_node('my_first_asset')}")

# For UI (Dagit) integration, save the following `Definitions` to a file (e.g., `my_repo.py`):
# defs = Definitions(
#     assets=[my_first_asset],
#     jobs=[my_asset_job],
# )
# Then run `dagster dev -f my_repo.py` and navigate to http://localhost:3000

view raw JSON →