The India User Group is live! Be a part of our first Indian user event: JOIN THE EVENT

Error in dataiku API

Solved!
sseveur
Level 2
Level 2
Error in dataiku API

Hi, 

There is an error is Dataiku's API in the recipe module. 

When we have to set a code env, it isn't the name passed as an argument but the name of the argument as a string ('code_env'). 

Best regards,

Steven 

 

0 Kudos
1 Solution
sseveur
Level 2
Level 2
Author

The solution I've used meanwhile a fix is out :

import dataiku
project = dataiku.api_client(dataiku.get_custom_variables()['projectKey'])
recipe = project.get_recipe('pyspark_recipe_create') # get our recipe
settings = recipe.get_settings()
settings.recipe_settings['params']['envSelection'] = {"envName": "code_env_name", "envMode": "EXPLICIT_ENV"}
settings.get_code_env_settings() # just to check if it is correctly set
settings.save() # save the edit settings = recipe.get_settings()

Steven

View solution in original post

1 Reply
sseveur
Level 2
Level 2
Author

The solution I've used meanwhile a fix is out :

import dataiku
project = dataiku.api_client(dataiku.get_custom_variables()['projectKey'])
recipe = project.get_recipe('pyspark_recipe_create') # get our recipe
settings = recipe.get_settings()
settings.recipe_settings['params']['envSelection'] = {"envName": "code_env_name", "envMode": "EXPLICIT_ENV"}
settings.get_code_env_settings() # just to check if it is correctly set
settings.save() # save the edit settings = recipe.get_settings()

Steven

View solution in original post

A banner prompting to get Dataiku DSS
Public