Jerry Bao
02/27/2024, 5:10 AMScout
02/27/2024, 5:10 AMAssetMaterialization
events for a particular asset key. When defining an asset sensor, you specify the asset key that the sensor will monitor and the job that should be triggered when the sensor fires. The sensor's evaluation function can yield a RunRequest
based on a single asset materialization, and this RunRequest
can include a run configuration that specifies the operations to be performed. The documentation also mentions the use of multi_asset_sensor
for scenarios where you want to monitor multiple assets and potentially trigger runs based on the materialization of those assets. In the context of a multi_asset_sensor
, you can access the latest materialization records for the monitored assets and make decisions based on that information. However, regarding the specific asset selection that will be materialized on a run request, the documentation does not provide a direct method to retrieve this information during sensor evaluation. The asset selection is typically defined when setting up the sensor and is used to determine which assets' materializations should trigger the sensor. If you need to access specific details about the asset selection during sensor evaluation, you might need to infer this information from the context provided to the sensor's evaluation function or from the configuration of the job that the sensor is set to trigger. If this is a requirement for your use case and is not covered by the current capabilities of Dagster, it might be worth exploring the possibility of a feature request or discussing it further with the Dagster community for potential workarounds.