Hi ! I use a `multi_asset_sensor` to detect materi...
# ask-community
j
Hi ! I use a
multi_asset_sensor
to detect materialization of a non-partitioned job, I saw that the method
latest_materialization_records_by_key
can be very useful in some cases. However I would like to have all materializations per key that occurred after the cursor and not only the last one. Is there a way to do this? Thanks in advance
c
Hi Jordan. You can instead call
context.materialization_records_for_key
, which will search for all events after the cursor for the given asset key. There is also a
limit
param so you can limit the number of returned records
j
Thanks Claire. Ideally I would like to not have this
limit
setting to make sure I get all the records. If I propose a PR making the limit parameter optional, do you think it could be approved?
c
Yep, feel free to tag me on that PR
get_event_records
(which is a public API) has the limit arg as optional, so I don't see why we shouldn't support the same thing within the multi asset sensor
👍 1
j