Survey banner
The Dataiku Community is moving to a new home! Some short term disruption starting next week: LEARN MORE

Add first_error_details as custom variable in reporter

Level 1
Add first_error_details as custom variable in reporter

I'm trying to add a custom variable to reporter, first_error_detail: 

settings = scenario.get_last_finished_run()
details  = settings.get_details()

# >> {'message': "Error in Python process: At line 135: <class 'KeyError'>: rebates"}

However I'm able to find any documentation about the mapping from the above method to the json in the custom variable creation:

import json
# compute your additional variables from the list of report items 
# and return them as a dictionary.
def get_variables(items_json, scenario_run_json, step_run_output_json):
    items = json.loads(items_json)
    return {}

I'm assuming it resides in scenario_run_json, but with no schema or documentation to refer to, it's proving to be quite the exercise. Any help here would be greatly appreciated! 

0 Kudos
0 Replies