getRecipe

特定のデータプレップレシピを ID で取得します。

構文 

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}

データプレップレシピ API リソース 

1GET /wave/recipes/${id}

getRecipe は、このデータプレップレシピ API リソースを使用します。

パラメータ 

  • id — (必須) レシピの ID。

  • format — (省略可能) 返されるレシピの形式を指定します。

    • R2 (従来のデータプレップ)
    • R3 (データプレップ) デフォルトは R3 です。

戻り値 

The Japanese Summer '24 guide is now live

日本語の Summer '24 ガイドが公開されました! 「Component Reference (コンポーネントリファレンス)」は、以前と同様にコンポーネントライブラリにあります。