{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Insightsモデルリレーションの更新","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"insightsモデルリレーションの更新","__idx":0},"children":["Insightsモデルリレーションの更新"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]},"または",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH"]},"を使用してInsightsモデルのリレーションを変更することはできません。代わりに、既存のリレーションを削除して、更新された定義で再作成します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["たとえば、データモデル",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["A"]},"が現在",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table1"]},"と",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table2"]},"を",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},"列でリレーションしているとします。リレーションIDを取得した後(",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/customer-data-platform/treasure-insights/reference-insights-model-endpoints"},"children":["データモデルリレーションのリストを取得"]},"を参照)、次の方法で",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table3"]},"をリレーションに追加できます:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["既存のリレーションを削除します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["3つのテーブルすべてを含む新しいリレーションを作成します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["APIエンドポイントについては、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/endpoints"},"children":["お使いの地域に適したエンドポイント"]},"を選択してください。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X DELETE https://<api endpoint>/reporting/datamodels/xxxxxx/relations/yyyyyy \\\n-H 'authorization: TD1 xxxx/xxxxxxxxxxxxxx' \\\n-H 'accept: application/json'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -v -X POST https://<api endpoint>/reporting/datamodels/xxxxxx/relations \\\n-H 'authorization: TD1 xxxx/xxxxxxxxxxxxxx' \\\n-H 'cache-control: no-cache' \\\n-H 'accept: application/json' \\\n-H 'content-type: application/json' \\\n-d '{\n  \"definition\": [\n    {\"dataset\": \"ds1\", \"table\": \"table1\", \"column\": \"name\"},\n    {\"dataset\": \"ds1\", \"table\": \"table2\", \"column\": \"name\"},\n    {\"dataset\": \"ds2\", \"table\": \"table3\", \"column\": \"name\"}\n  ]\n}'\n","lang":"bash"},"children":[]}]},"headings":[{"value":"Insightsモデルリレーションの更新","id":"insightsモデルリレーションの更新","depth":1}],"frontmatter":{"seo":{"title":"Insightsモデルリレーションの更新"}},"lastModified":"2026-03-10T06:52:05.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/treasure-insights/update-an-insights-model-relation","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}