Python Recipe - Get name of current recipe, inputs, and outputs (DSS 8)

sylvyr3 Registered Posts: 21 ✭✭✭✭
edited July 16 in Using Dataiku

I'm trying to write a python recipe that that calls a function from an internal module but I need to be able to pass the name of the input and output table for that recipe. Since the user can specify any name for the output table I need to be able to grab it programmatically.

It seems like it's fairly easy in DSS 9 -

In DSS 8 it looks like I might need to pass the name of the current recipe to (


retrieve the names of the inputs and outputs. But it seems like the default recipe naming convention is "compute_"+output_dataset_name. So I'm back to the problem of not knowing what the recipe name is without an api call of some sort.


Best Answer

  • fchataigner2
    fchataigner2 Dataiker Posts: 355 Dataiker
    Answer ✓


    if your recipe is not partitioned, then you can get its name by taking the activity id and removing the _NP end

    from dataiku.core.flow import FLOW
    current_recipe_name = FLOW["currentActivityId"][:-3]

Setup Info
      Help me…