Change Recipe Engine using the API

mallisundaresan Dataiku DSS Core Designer, Registered Posts: 6
edited July 16 in Using Dataiku

Hi Dataiku Team,

I am able to change the engine of prepare recipes using the code here : . 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'

/opt/dataiku-dss-12.5.1/python/dataikuapi/dss/ in raw_params(self)
    527         :rtype: dict
    528         """
--> 529         return self.recipe_settings["params"]
    531     def _payload_to_str(self):

KeyError: 'params'

Can anyone help me resolve this issue?

Operating system used: Linux

Best Answer

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,727 Neuron
    edited July 17 Answer ✓

    Use this:

    settings = recipe.get_settings()
    settings.get_json_payload['engineType'] = "DSS"


Setup Info
      Help me…