Mycchaka Kleinbort
03/15/2023, 4:03 PMx
is very different from the previously actioned report, a human has to action on it, and the latest report becomes the reference-point to future reports.
I'd like to find a way to encode this in the Dagster system - e.g. so I can automate sending a reminder to the "human" while the latest report is not actioned on.
The code I'm envisioning is:
@asset
def needs_action_flag(x, x_last_actioned_on):
return is_very_different(x, x_last_actioned_on)
The part I'm finding difficult is to have an ad-hoc materialization of x_last_actioned_on
- the code for x_last_actioned_on
is just
@asset
def x_last_actioned_on(x):
return x
The challenge comes from only materializing this IF a human has actioned it (this could be manual)yuhan
03/16/2023, 11:54 PMneeds_action_flag
asset materializes flag_a
b. kick_off_downstream_if_human_did_action_sensor
listens on that flag_a
asset and checks if the human did anything at the sensor’s evaluation interval (defaults to 30 seconds)
c. when the human did the action, the sensor will kick off the downstream run (x_last_actioned_on
, etc)