Python API: Get Last Trigger Fire or Scenario Run in a Scenario

importthepandas
Python API: Get Last Trigger Fire or Scenario Run in a Scenario

I cannot seem to find a solution for this on the community. I know we can get last runs, but I need the scenario to be aware of itself while running to call dataiku api_client methods. Unless I am missing something, is there a solution for this?

0 Kudos
3 Replies
importthepandas
Author

Scenario im using this in is for custom triggers which work in a window around a user specified time to ensure they fire within +/- 5m, we've been seeing inconsistency so would like to be able to grab the last trigger fire time to do some quick logical checking and take action

0 Kudos

Hi @importthepandas,

Would the last bullet in this post help?

Marlan

0 Kudos
importthepandas
Author

not quite. I cannot call the Scenario object and its method from the trigger directly. I'm just trying to back into a way to check when the trigger last fired... some how some way... within the trigger itself. I can get to the trigger ID, iterate over scenarios... trying to find the ID and then potentially there's a way to get to the trigger's history but it's not entirely clear. Reason I'm doing this is because I'm trying to stick the landing on times provided in a custom trigger which only lets us use run every and shifts time based on trigger time runs -- I really wish we could fix times as another option for these custom trigger fires.

 

 

0 Kudos