Python recipe - iterate through inputs

Options
alundavid
alundavid Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered Posts: 17 ✭✭✭✭

Possibly a newbie question, but here goes.

I am writing a Python recipe with several input datasets. Within the recipe, I'd like to loop through the inputs, doing some work on each in turn.

What would be an efficient way to code that?

Thanks in advance.

Answers

  • Clément_Stenac
    Clément_Stenac Dataiker, Dataiku DSS Core Designer Posts: 753 Dataiker
    Options

    Hi,

    This is possible if you are running DSS 9:

    import dataikuimport dataiku.recipefor dataset in recipe.get_inputs():print("working on dataset %s" % dataset.name)df = dataset.get_dataframe()# Work with the df ...
Setup Info
    Tags
      Help me…