Skip to content

Commit

Permalink
[core-api][experimental] multi_asset_sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenKephart committed Dec 31, 2024
1 parent 16083d3 commit 8f816de
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)

import dagster._check as check
from dagster._annotations import deprecated_param, experimental, public
from dagster._annotations import deprecated_param, public, superseded
from dagster._core.definitions.asset_selection import AssetSelection
from dagster._core.definitions.assets import AssetsDefinition
from dagster._core.definitions.events import AssetKey
Expand Down Expand Up @@ -168,7 +168,6 @@ def get_stringified_cursor(self) -> str:
breaking_version="2.0",
additional_warn_text="Use `last_tick_completion_time` instead.",
)
@experimental
class MultiAssetSensorEvaluationContext(SensorEvaluationContext):
"""The context object available as the argument to the evaluation function of a
:py:class:`dagster.MultiAssetSensorDefinition`.
Expand Down Expand Up @@ -984,7 +983,6 @@ def get_cursor_from_latest_materializations(
return cursor_str


@experimental
def build_multi_asset_sensor_context(
*,
monitored_assets: Union[Sequence[AssetKey], AssetSelection],
Expand Down Expand Up @@ -1103,7 +1101,12 @@ def build_multi_asset_sensor_context(
]


@experimental
@superseded(
additional_warn_text="For most use cases, Declarative Automation should be used instead of "
"multi_asset_sensors to monitor the status of upstream assets and launch runs in response. "
"In cases where side effects are required, or a specific job must be targeted for execution, "
"multi_asset_sensors may be used."
)
class MultiAssetSensorDefinition(SensorDefinition):
"""Define an asset sensor that initiates a set of runs based on the materialization of a list of
assets.
Expand Down

0 comments on commit 8f816de

Please sign in to comment.