Scenario Variables

Tej
Tej Registered Posts: 3

Hi.
I created a scenario. In step 1, I read the parameters sent over the webapp API using get_trigger_params and set_scenario_variables - the next step is to run the recipe. I would like to know how to read the set scenario variables within the recipe scope so that parallel runs on the scenario execute smoothly.

Since they will be overwritten for each run, I am unable to designate them as project variables - keeping in mind the scope for parallel runs.. Kindly advise.

Thanks in advance.

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,624 Neuron
    edited December 6

    I covered this issue with a lot of detail on this response but I will give you a shorter answer here. You don't have to set the parameters as variables in the scenario if you are happy to use the scenarioTriggerParam_[param_name] variable names. You also don't have to create them as project variables to use them in recipes. However in practice you do want them created as project variables as otherwise you won't be able to run your recipes outside the scope of a scenario run and some recipes might give errors as they can't recognise the scenario variable names. This is really Dataiku's fault. Scenario parameters should be required to be defined in the scenario so that they can be used without issues across the project. Defining them as project variables won't cause you any trouble since scenario variables and scenario parameters will always override project variables and will only exist within the scope of that particular scenario run. Having said that a scenario can't have parallel runs, only one single execution of a particular is allowed.

Setup Info
    Tags
      Help me…