dagster
dagster copied to clipboard
API for loading an asset into a Python object
In a notebook, or in an op, you might want to load an asset to inspect it. Imagine if you could do something like this:
@repo
def repo():
...
my_repo.load_asset(AssetKey("abc"))
It would call the IO manager associated with the asset and load it. load_asset
could accept an argument that's a Python type, for IO managers whose Python object depends on a Python type.
Right now, you'd need to instantiate the IO manager associated with the output, call build_input_context
to create an input context with the relevant information, then call load_input
.