Setup for the Tutorial

Python and pip

We’ll assume that you have some familiarity with Python, but you should be able to follow along even if you’re coming from a different programming language. To check that Python and the pip package manager are already installed in your environment or install them, you can follow the instructions here.

Dagster and Dagit

pip install dagster dagit

This installs two modules:

  • Dagster: the core programming model and abstraction stack; stateless, single-node, single-process and multi-process execution engines; and a CLI tool for driving those engines.
  • Dagit: the UI for developing and operating Dagster pipelines, including a DAG browser, a type-aware config editor, and a live execution interface.

Quick Start

Let's get your first Dagster code running.

from dagster import execute_pipeline, pipeline, solid


@solid
def get_name(_):
    return 'dagster'


@solid
def hello(context, name: str):
    context.log.info('Hello, {name}!'.format(name=name))


@pipeline
def hello_pipeline():
    hello(get_name())

Save the code above in a file named hello_dagster.py. You can execute the pipeline using any one of the following methods:

(1) Dagster Python API

if __name__ == "__main__":
    execute_pipeline(hello_pipeline)   # Hello, dagster!

(2) Dagster CLI

dagster pipeline execute -f hello_dagster.py

(3) Dagit web UI

Run the following command, then navigate to http://localhost:3000 to start using Dagit. Click on the "Playground" tab, then press the "Launch Execution" button to execute the pipeline.

dagit -f hello_dagster.py

If You Get Stuck

If you have questions on getting started, we'd love to hear from you: