Leo Qin
04/26/2023, 8:03 PMload_input
I do the following to get the output metadata:
event = context.instance.get_latest_materialization_event(context.asset_key)
metadata = event.dagster_event.event_specific_data.materialization.metadata
What's happening when Asset A and Asset B are materialized in the same run, Asset B is able to get the path from the metadata without issue. However, when they are in separate runs, I get this error:
RecursionError: maximum recursion depth exceeded
File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_plan.py", line 269, in dagster_event_sequence_for_step
for step_event in check.generator(step_events):
File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_step.py", line 344, in core_dagster_event_sequence_for_step
for event_or_input_value in step_input.source.load_input_object(step_context, input_def):
File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/plan/inputs.py", line 185, in load_input_object
metadata=asset_layer.metadata_for_asset(input_asset_key),
File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/asset_layer.py", line 659, in metadata_for_asset
{key: cast(RawMetadataValue, value.value) for key, value in metadata.items()}
File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/asset_layer.py", line 659, in <dictcomp>
{key: cast(RawMetadataValue, value.value) for key, value in metadata.items()}
File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/metadata/__init__.py", line 855, in value
return self.value
File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/metadata/__init__.py", line 855, in value
return self.value
File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/metadata/__init__.py", line 855, in value
return self.value
[Previous line repeated 983 more times]
So, there's something about how I'm retrieving the metadata that isn't quite right... any ideas?chris
04/26/2023, 9:36 PM