{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"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":["#POST /reporting/datamodels を呼び出してデータモデルを作成します。以下は、以前に作成したYAMLファイルを参照しながらデータモデルを作成する例です。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["_sample_datasets_データベースにアクセスし、2つのテーブル__nasdaq__と__www_access__を作成します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["__symbol__列と__host__列の間にリレーションシップを作成します。"]}]},{"$$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 POST --data-urlencode \"yaml=$(cat datamodel.yml)\" \\\n-H 'Authorization: TD1 xxxx/xxxxxxxxxxxxxx' \\\nhttps://${TD_API_ENDPOINT}/reporting/datamodels\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["実際のInsightsモデルは分析プラットフォームで作成されます。作成されたプレフィックスは次の形式を使用します:dm_{your account id}_。__たとえば、__アカウントIDが1の場合、Insightsモデル名は_dm_1_sample_datamodel_です。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["モデル名は大文字と小文字を区別しません。モデル名は自動的に小文字に変換されます。たとえば、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data_MODEL_one"]},"と",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data_model_ONE"]},"は同じデータモデル:",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data_model_one"]},"を作成します。"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["分析プラットフォームは_unixtimestamp_をサポートしていません。ウィジェットで_datetime_を使用する場合は、Insightsモデルを作成する前に_unixtimestamp_をタイムスタンプ形式のテキストに変換し、列を_timestamp_のタイプとして定義してください。"]}]}]},"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/create-an-insights-model","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}