Skip to content

Commit

Permalink
[auto-materialize] fix external asset + amp (#20204)
Browse files Browse the repository at this point in the history
## Summary & Motivation

## How I Tested These Changes
  • Loading branch information
OwenKephart authored Mar 1, 2024
1 parent 19b4df7 commit e3d4c42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def get_minutes_overdue(
"Cannot calculate minutes late for asset without a FreshnessPolicy"
)

if self.asset_graph.is_external(asset_key):
if self.asset_graph.is_observable(asset_key):
current_data_time = self._get_source_data_time(asset_key, current_time=evaluation_time)
else:
current_data_time = self.get_current_data_time(asset_key, current_time=evaluation_time)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def get_asset_record(self, asset_key: AssetKey) -> Optional["AssetRecord"]:
return self._asset_record_cache[asset_key]

def _event_type_for_key(self, asset_key: AssetKey) -> DagsterEventType:
if self.asset_graph.is_external(asset_key):
if self.asset_graph.is_observable(asset_key):
return DagsterEventType.ASSET_OBSERVATION
else:
return DagsterEventType.ASSET_MATERIALIZATION
Expand Down Expand Up @@ -535,7 +535,7 @@ def asset_partitions_with_newly_updated_parents_and_new_cursor(
"""Finds asset partitions of the given child whose parents have been materialized since
latest_storage_id.
"""
if self.asset_graph.is_external(child_asset_key):
if not self.asset_graph.get_parents(child_asset_key):
return set(), latest_storage_id

child_partitions_def = self.asset_graph.get_partitions_def(child_asset_key)
Expand Down Expand Up @@ -805,7 +805,7 @@ def get_asset_partitions_updated_after_cursor(
if not updated_after_cursor:
return set()
if after_cursor is None or (
not self.asset_graph.is_external(asset_key)
not self.asset_graph.is_observable(asset_key)
and not respect_materialization_data_versions
):
return updated_after_cursor
Expand Down

0 comments on commit e3d4c42

Please sign in to comment.