Update a recipe

You can attach or detach recipes to/from existing Data Lake clusters in an available state. Using this capability, you can update a recipe by removing it from the cluster, replacing the old recipe with a modified recipe of the same type, and attaching the new modified recipe to the cluster.

Attaching or detaching a recipe will not execute the recipe. The next execution of the recipe will take place based on the type of the recipe. After an upscale, a newly attached recipe runs only on the new hosts.
Required role (one of the following):
  • PowerUser on CDP tenant
  • Owner of the environment
  • EnvironmentAdmin
  1. Create a new recipe (with updated/modified content) of the same type as the old recipe that you want to replace.
  2. Click Data Lakes > <Data Lake Name> and scroll to the Data Lake details pane at the bottom of the page. Click the Recipes tab and find the recipe that you want to remove in the list of recipes for the Data Lake.
  3. Click Remove Recipe next to the name of the recipe that you want to remove, then click Yes in the confirmation window.
  4. Once you have removed the old recipe, click on the Add Recipe button for the Data Lake and select the same host group that you previously used for the old recipe. Then select the name of the new recipe that contains the modified content and click Add.
  5. Alternatively, you can use the CDP CLI to attach or detach recipes from a host group:
    cdp datalake replace-recipes --datalake <CRN or name> --instance-group-recipes instanceGroupName=<instance group name>,recipeNames=<recipe names>
    Note that the same command is used to both detach and attach a recipe. When you attach a recipe, use the recipeNames parameter to specify the recipe or recipes that you want to attach; when you detach a recipe, give the instanceGroupName but do not provide a recipeName. For example:
    To detach all recipes from an instance group:
    cdp datalake replace-recipes --datalake myDL --instance-group-recipes
                instanceGroupName=worker,recipeNames=

    To attach a new recipe:

    cdp datalake replace-recipes --datalake myDL --instance-group-recipes
                instanceGroupName=worker,recipeNames=myrecipe

    For instance groups with multiple recipes, give the recipeNames that you would like to keep. Any recipes not specified will be detached.

You should see the new recipe appear for the same host group. After this change, the next recipe execution will execute the new script.