Managed folder

UserBird
UserBird Dataiker, Alpha Tester Posts: 535 Dataiker
Hi, I would like to get the names of the managed folder/s that serve as input to my recipe.

However, when I do input_B_names = get_input_names_for_role('managed_folder'), I get something like:
[MYPROJECT.somerandomkey]

The list does not contain the name I gave my managed_folder. It does contain the actual folder in DSS. I cannot therefore use the elements of the list as input to dataiku.Folder() function.

Is there a way I can get the names of the managed folder inputs?



thanks

Answers

  • fchataigner2
    fchataigner2 Dataiker Posts: 355 Dataiker
    edited July 17

    Hi,

    managed folders have both a name and an identifier (the "somerandomkey" in your case). The dataiku.Folder() function accepts both identifiers and names. If you need to translate identifier to name, you can do:


    mf = dataiku.Folder(identifier)
    name = mf.get_info()["name"]

    Regards,

    Frederic

Setup Info
    Tags
      Help me…