Returning error from a python-scripted Scenario
Keufran
Registered Posts: 12 ✭✭✭✭
Hello Dataiku-world,
I'm looking for a way to return a status (OK, ERROR) from a custom scripted scenario (Python, DSS 7.02)
I naivly tried the following:
scenario = Scenario()
scenario.outcome= "OK" (or "ERROR")
But this don't work. Even throwing an exception from my code is intercepted and the scenario appears to be executed correctly.
Best Answer
-
Hello,
Are you just trying to get the scenario to fail?
How are you throwing the exception in your code? I was able to get a Python scenario to fail by simply raising an exception:
raise Exception('failed run')
Answers
-
It seems I missed something when throwing the exception... Your solution works perfectly.