Scenario with Warning output

Hetesh
Hetesh Registered Posts: 13 ✭✭✭✭
edited July 16 in Using Dataiku

Hi DSS Community,

with v11 bringing the following change to the Scenarios;

  • Propagate warnings from steps to the outcome of the scenario

my python script running outside of DSS which waits for a scenario to run is now halting on the return of a Warning result from the scenario, whereas before my scenarios would be successful.

scenario.run_and_wait()

#returns error and halts code
#dataikuapi.utils.DataikuException: Scenario run returned status WARNING

How do I ignore Warnings on my overall scenario result in order for my python script to continue?

Answers

  • Catalina
    Catalina Dataiker, Dataiku DSS Core Designer, Registered Posts: 135 Dataiker
    edited July 17

    Hi @HeteshPatel
    ,

    According to the Dataiku API code you can ignore Warnings on your scenario result if you use the parameter no_fail=True:

    scenario.run_and_wait(no_fail=True)

  • Hetesh
    Hetesh Registered Posts: 13 ✭✭✭✭

    Thanks @CatalinaS
    unfortunately this also ignores if the scenario results in a failure, ideally we would need a new parameter to handle no_warning in the api it seems.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,166 Neuron

    I think it's very risky for you to ignore warnings. The best approach is to resolve the warnings so that the scenario completes as SUCCESS. If you don't care about warnings you can easily trap the exception and ignore the warning.

Setup Info
    Tags
      Help me…