Harry James
07/03/2023, 9:00 AMfrom dagster import (
InMemoryIOManager,
asset,
materialize,
)
@asset
def asset_a():
return
@asset()
def asset_b(asset_a):
return
shared_io_manager = InMemoryIOManager()
materialize(
assets=[asset_a, asset_b],
resources={"io_manager": shared_io_manager},
selection=[asset_a],
)
materialize(
assets=[asset_a, asset_b],
resources={"io_manager": shared_io_manager},
selection=[asset_b],
)
dagster._core.errors.DagsterInvariantViolationError: Attempting to access run_id, but it was not provided when constructing the OutputContext
Harry James
07/03/2023, 12:25 PMjamie
07/03/2023, 3:15 PMInMemoryIOManager
is created for each materialization. This means that any historical information about previous runs is lost. I suggest trying the FileSystemIOManager
instead! Otherwise your code snippet looks good to meHarry James
07/03/2023, 3:54 PMjamie
07/03/2023, 3:58 PM