getRecipe

Retrieves a specific data prep recipe by ID.

Syntax 

1import { LightningElement, api, wire } from "lwc";
2import { getRecipe } from "lightning/analyticsWaveApi";
3
4export default class GetRecipe extends LightningElement {
5  @api recipeId; // or fetch the ID
6  @wire(getRecipe, {
7    id: "$recipeId",
8    format: "R3",
9  })
10  onGetRecipe({ data, error }) {
11    if (error) {
12      console.log(`getRecipe(${recipeId}) ERROR:`, error);
13    } else if (data) {
14      console.log(`getRecipe(${recipeId}) RESPONSE:`, data);
15    }
16  }
17}

Data Prep Recipe API Resource 

1GET /wave/recipes/${id}

getRecipe uses this Data Prep Recipe API resource.

Parameters 

Parameter NameTypeDescriptionRequired?
idStringThe ID of the recipe.Yes
formatStringSpecifies the format of the returned recipe:
  • R2 (Data Prep Classic)
  • R3 (Data Prep)
The default is R3.

Returns