Created
June 26, 2024 16:50
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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