R Library in Plugin
jvijayakumar2
Partner, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 30 Partner
I'm creating a custom R recipe in a plugin and I want to include a library folder. Is there a way to do this like how we have a python-lib folder with all .py files and use from-import to have the method imported in the recipe.py file?
Tagged:
Best Answer
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,215 Dataiker
Hi @jvijayakumar2
,
The solution for the R code recipe plugin is to create a resources folder and use dkuCustomRecipeResource
https://doc.dataiku.com/dss/api/11/R/dataiku/reference/dkuCustomRecipeResource.htmle.g source(file.path(dkuCustomRecipeResource(), "clean.R"))
You can find an example plugin doing this here for reference:https://github.com/dataiku/dss-plugin-timeseries-forecast-legacy
Thanks