Error in dataiku API

Tags
Partner, L2 Designer, Registered Posts: 16 Partner

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

Best Answer

  • Partner, L2 Designer, Registered Posts: 16 Partner
    Answer ✓

    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

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.