Community Conundrum 28: News Engagement is live! Read More

Continue custom python scenario script if error is encountered

Level 2
Continue custom python scenario script if error is encountered


When building a scenario using the sequence of steps option, it's possible to select ignore failure for 'Run another scenario' step.  Is there a way to ignore failure in the custom python scenario script?  

In the below example, "scenario.run_scenario('Test_Tables_Databases')" will run a scenario that will fail because it is executing scenario.execute_sql() on a table that doesn't exist (for test purposes).  Once that scenario fails then the current scenario will stop.  Is there a way to run my custom python scenario script without stopping if a failure is encountered?

import dataiku
from dataikuapi.dss.scenario import DSSScenario
from dataiku.scenario import Scenario

client = dataiku.api_client()
scenario = Scenario()

# Run the scenario that checks each table for database locks

dss_scenario_test = DSSScenario(client, dataiku.default_project_key(), "Test_Tables_Databases")

# Check if 'test' scenario succeeded or failed
outcome = dss_scenario_test.get_last_runs()[0].get_info()['result']['outcome']

if outcome == 'SUCCESS':


#elif outcome == 'FAILED':


2 Replies


You should be able to achieve such behavior using the Public API:

Hope it helps,


Level 2

Thanks, got it to work.

removed run_scenario() and added dss_scenario_test.run_and_wait(no_fail=True).

0 Kudos
A banner prompting to get Dataiku DSS