Pass Variabes (Recipe Execution)

Tej
Tej Registered Posts: 3

Hi everyone.

I'm using Dataiku 14, and I'm using get_recipe("NAME").run() to call the execution of a project B recipe from project A.
But I want to pass a variable that has a value (for instance, ID = 1) to execute the recipe.

Could someone please advise me how to do it? Also, how should I declare the variable in Project B's recipe so that the value is read?

Answers

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

    I don't recommend you call a recipe in code like this. This call will remain hidden to any dependency analysis since it's done on code. Also calling a different project recipe makes things much worse as now you are hiding cross project dependencies. Finally I don't recommend using project variables like this as they are persisted in the project. So the best solution will be to use a Scenario on Project B which builds the output dataset of your project B recipe. Then use scenario parameters to pass your desired parameters. I covered scenario parameters in this reply. The reply is long but this is required to understand the nounces of dealing with scenario parameters or even scenario variables, both of which are not available outside the scenario scope so dealing with them requires some work arounds.

Setup Info
    Tags
      Help me…