Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

How to send custom data to scenario report?

Level 2
How to send custom data to scenario report?



I would like to return some values from the dataset that was build as a part of the scenario in the report. 

0 Kudos
1 Reply

Hi @Sunny ,
You could use a python step to set scenario variable and later use these in the reporter. 

Here is an example where I add the df.shape as a variable

# -*- coding: utf-8 -*-
import dataiku
import pandas as pd
from dataiku import pandasutils as pdu
from dataiku.scenario import Scenario

# Read recipe inputs
crm_history = dataiku.Dataset("crm_history")
df = crm_history.get_dataframe()

variable_value = str(df.shape)

scenario = Scenario()

variable_param = {"df_shape_var": variable_value}

# Print all variables now available for troubleshooting
variables = Scenario().get_all_variables()
0 Kudos


Labels (1)

Setup info

Tags (1)
A banner prompting to get Dataiku