dagster-pipes (version 1.12.22) is a toolkit for integrating external transform logic with Dagster, enabling communication between arbitrary external processes and the Dagster orchestration layer. It allows external programs to report events like asset materializations, observations, and logs back to Dagster via a lightweight, message-based protocol. The library is released in lockstep with Dagster core, meaning new versions typically coincide with major Dagster releases.
pip install dagster-pipesVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to define an `PipesExternalAsset` in Dagster that executes a Python script in an external process. The external script uses `PipesClient` to send an `AssetMaterialization` event back to Dagster, illustrating the core communication pattern. The `PipesExternalAsset` handles passing the necessary context to the external process.
Always install `dagster-pipes` with the same major.minor.patch version as your `dagster` package (e.g., `dagster==1.12.22` and `dagster-pipes==1.12.22`).
Ensure that all necessary dependencies, including `dagster-pipes` if using `PipesClient` in the external code, are available in the execution context of the `command` specified for `PipesExternalAsset`. This often means including it in a Docker image, virtual environment, or `PATH`.
Within your external Python script, always retrieve the context using `from dagster_pipes import get_dagster_pipes_context; context = get_dagster_pipes_context()` before initializing `PipesClient`.
Use `PipesClient` methods like `report_asset_materialization`, `report_asset_observation`, and `report_logs` to communicate status and metadata about the external work. For actual data transfer between assets or systems, rely on established storage mechanisms (e.g., S3, databases, GCS) that your external process and other Dagster assets can both access.