Skip to content
Last updated

Insightsモデルリレーションの更新

PUTまたはPATCHを使用してInsightsモデルのリレーションを変更することはできません。代わりに、既存のリレーションを削除して、更新された定義で再作成します。

たとえば、データモデルAが現在table1table2id列でリレーションしているとします。リレーションIDを取得した後(データモデルリレーションのリストを取得を参照)、次の方法でtable3をリレーションに追加できます:

  1. 既存のリレーションを削除します。
  2. 3つのテーブルすべてを含む新しいリレーションを作成します。

APIエンドポイントについては、お使いの地域に適したエンドポイントを選択してください。

curl -X DELETE https://<api endpoint>/reporting/datamodels/xxxxxx/relations/yyyyyy \
-H 'authorization: TD1 xxxx/xxxxxxxxxxxxxx' \
-H 'accept: application/json'
curl -v -X POST https://<api endpoint>/reporting/datamodels/xxxxxx/relations \
-H 'authorization: TD1 xxxx/xxxxxxxxxxxxxx' \
-H 'cache-control: no-cache' \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-d '{
  "definition": [
    {"dataset": "ds1", "table": "table1", "column": "name"},
    {"dataset": "ds1", "table": "table2", "column": "name"},
    {"dataset": "ds2", "table": "table3", "column": "name"}
  ]
}'