Skip to content

Commit

Permalink
update accessing metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Dec 28, 2023
1 parent 90570bf commit be728b5
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,12 @@ def load_input(self, context: InputContext) -> Union[Any, Dict[str, Any]]:
path = self._get_path(context)
return self._load_single_input(path, context)
else:
upstream_metadata = context.step_context._upstream_metadata.get(context.asset_key, {})
print(upstream_metadata)
if upstream_metadata.get("output_is_none", False):
latest_materialization = context.step_context.latest_materialization_event.get(
context.asset_key
)
if latest_materialization and latest_materialization.metadata.get(
"output_is_none", False
):
return None
asset_partition_keys = context.asset_partition_keys
if len(asset_partition_keys) == 0:
Expand Down

0 comments on commit be728b5

Please sign in to comment.