Skip to content

Instantly share code, notes, and snippets.

@garethbrickman
Created June 26, 2024 16:50
Show Gist options
  • Save garethbrickman/9e365fc965cefa70a17c7c1a71b6b34e to your computer and use it in GitHub Desktop.
Save garethbrickman/9e365fc965cefa70a17c7c1a71b6b34e to your computer and use it in GitHub Desktop.
Dagster - example showing how to pass the return data from an upstream asset to a downstream asset
from dagster import asset, Definitions, AssetExecutionContext
@asset
def upstream_asset():
return "data produced by upstream_asset"
@asset()
def downstream_asset(context: AssetExecutionContext, upstream_asset: str):
context.log.info(f"processed {upstream_asset}")
return
defs = Definitions(
assets=[upstream_asset, downstream_asset]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment