Airton Neto
12/22/2022, 12:52 PM# %%
from dagster import asset, materialize_to_memory
@asset(
name='simple',
key_prefix='prefix'
)
def simple() -> str:
return "simple"
result = materialize_to_memory(
[simple]
)
simple_res = result.output_for_node(simple.key)
This code throws an error
ParameterCheckError: Param "handle_str" is not a str. Got AssetKey(['prefix', 'simple']) which is type <class 'dagster._core.definitions.events.AssetKey'>.
What is the str key for this asset then? I used not to put a key_prefix and fetch asset results by just calling
result.output_for_node('simple')
sean
12/22/2022, 5:52 PMAirton Neto
12/22/2022, 6:02 PM