Coming soon: We’re working on a brand new, revamped Community experience. Want to receive updates? Sign up now!

0 votes

I'm using a managed folder to hold a list of unstructured files a dev plugin needs to read in as input

path <- dkuManagedFolderPath("PATHWAYANALYSIS.Genesets")

When I use this dev plugin within the "PATHWAYANALYSIS" project, all is good. When I try and use it within another project I get messages like - 

[2018/07/13-00:25:44.420] [null-out-37] [INFO] [dku.utils]  - > path <- dkuManagedFolderPath("PATHWAYANALYSIS.Genesets")
[2018/07/13-00:25:44.442] [null-err-38] [INFO] [dku.utils]  - Error in dku__check_api_error(resp, "Failed to get Box path") : 
[2018/07/13-00:25:44.443] [null-err-38] [INFO] [dku.utils]  -   Failed to get Box path (HTTP code 500): Managed folder name not found: Genesets in PATHWAYANALYSIS

Can anyone think of a creative way to allow a plugin to read files from one project and run in another project?


Many thanks




1 Answer

+1 vote
Best answer

Solved my own problem. 

The way to do it is to add another input to your plugin that accepts managed folders ("acceptsManagedFolder": true)

Then read this input in your plugin and use it to get the path for the managed folders

"inputRoles" : [
            "name": "genesets_input",
            "label": "Managed folder of genesets",
            "description": "The list of genesets to use in this analysis",
            "arity": "UNARY",
            "required": true,
            "acceptsDataset": false,
            "acceptsManagedFolder": true

and then in your R recipe code

genesets_input = dkuCustomRecipeInputNamesForRole("genesets_input")
path <- dkuManagedFolderPath(genesets_input[1])

Then share the managed folder with the project that needs it to run the plugin. As a bonus you see the managed folder being included in your flow graph.

1,337 questions
1,364 answers
11,916 users

©Dataiku 2012-2018 - Privacy Policy