Change Recipe Engine using the API
Mali
Dataiku DSS Core Designer, Registered Posts: 6 ✭✭
Hi Dataiku Team,
I am able to change the engine of prepare recipes using the code here :https://community.dataiku.com/t5/Setup-Configuration/Change-a-recipes-engine-using-the-API/td-p/24974 . But it fails for other recipes like join and group. I have verified in the UI that these recipes have both SPARK and DSS as the engine options. I want to change their engine from SPARK to DSS. The error I get is shown below:
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-99-f75ef26b38e9> in <module> 1 settings = recipe.get_settings() ----> 2 settings.raw_params['engineType'] = 'DSS' 3 settings.save() /opt/dataiku-dss-12.5.1/python/dataikuapi/dss/recipe.py in raw_params(self) 527 :rtype: dict 528 """ --> 529 return self.recipe_settings["params"] 530 531 def _payload_to_str(self): KeyError: 'params'
Can anyone help me resolve this issue?
Operating system used: Linux
Best Answer
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,160 Neuron
Use this:
settings = recipe.get_settings() settings.get_json_payload['engineType'] = "DSS" settings.save
Answers
-
This worked. Thank you!