dataiku-api-client-python icon indicating copy to clipboard operation
dataiku-api-client-python copied to clipboard

set recipe params

Open henridwyer opened this issue 8 years ago • 2 comments

It would be useful to be able to set the recipe params on a recipe object

henridwyer avatar May 26 '17 21:05 henridwyer

r = project.get_recipe("compute_pouet")
def = r.get_definition_and_payload()
def.get_params()["mynewparam"] = "mynewvalue"
r.set_definition_and_payload(def)

cstenac avatar May 26 '17 21:05 cstenac

Thanks this works, although the above code can fail for some recipes which have None for recipe params.

I guess I was thinking that since there is a method to explicitly get the recipe params, there could be one to set them. Feel free to close if you think that's unnecessary.

henridwyer avatar May 26 '17 21:05 henridwyer