Ready for Dataiku 10? Try out the Crash Course on new features!GET STARTED

Dataiku scenario

Solved!
mahesh_s
Level 1
Level 1
Dataiku scenario

Hi everyone,

I created a scenario that runs on hourly basis. Now if scenarios fails for any reason I want to deactivate auto trigger so it won't run until I troubleshoot the failure.

Is there any easy way of doing this through the visual interface?

0 Kudos
1 Solution
AgatheG
Dataiker
Dataiker

Hi mahesh_s,

I think a good way to handle your use case would be to add a custom Python step (in the Add step dropdown, Code > Execute Python code) at the end of your scenario, with Run this step set on the If a prior step failed option.

To unset the auto-trigger field of your scenario, you could for instance use the snippet below, filling YOUR_PROJECT_KEY and YOUR_SCENARIO_ID with the proper values:

from dataiku import api_client
project = api_client().get_project(YOUR_PROJECT_KEY)
scenario_settings = project.get_scenario(YOUR_SCENARIO_ID).get_settings()

scenario_settings.active = False
scenario_settings.save()

 

 

Hope this helps,

 

Agathe

View solution in original post

0 Kudos
2 Replies
AgatheG
Dataiker
Dataiker

Hi mahesh_s,

I think a good way to handle your use case would be to add a custom Python step (in the Add step dropdown, Code > Execute Python code) at the end of your scenario, with Run this step set on the If a prior step failed option.

To unset the auto-trigger field of your scenario, you could for instance use the snippet below, filling YOUR_PROJECT_KEY and YOUR_SCENARIO_ID with the proper values:

from dataiku import api_client
project = api_client().get_project(YOUR_PROJECT_KEY)
scenario_settings = project.get_scenario(YOUR_SCENARIO_ID).get_settings()

scenario_settings.active = False
scenario_settings.save()

 

 

Hope this helps,

 

Agathe

View solution in original post

0 Kudos
mahesh_s
Level 1
Level 1
Author

Hi Agathe, Thanks. Your solution has worked for me.