{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Mixpanel Import Integration","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":"mixpanel-import-integration","__idx":0},"children":["Mixpanel Import Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mixpanel用データコネクタを使用すると、MixpanelのイベントデータをTreasure Dataにバックアップできます。ユースケースには以下が含まれます："]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ユースケース"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["説明"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["一回限りの移行"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["組織がMixpanelから移行し、データの生コピーを保持したい場合"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["増分型の日次バックアップ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["組織がMixpanel内のイベントデータにSQLでよりきめ細かいアクセスを必要とする場合"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mixpanelからイベントデータをインポートする方法のサンプルワークフローについては、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/treasure-boxes/tree/master/td_load/mixpanel"},"children":["Treasure Boxes"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールを使用する","__idx":1},"children":["Treasure コンソールを使用する"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しい接続を作成する","__idx":2},"children":["新しい接続を作成する"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Integrations Hub > Catalogに移動します"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Mixpanelを検索して選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["以下のダイアログが開きます。Mixpanelの認証情報の詳細を編集します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"を選択し、この接続の名前を指定します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200331-191757.62ae4934c2d416ee52ac82c22d39f0c09cd44e57f2928e0c14050423ccb5d3cc.6d61b60d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しいソースを作成する","__idx":3},"children":["新しいソースを作成する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接続を作成すると、自動的にAuthenticationsページに移動します。作成した接続を探して、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Source"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200331-191831.26c095e5bbdc4e186d5fa3ccfc1a83d8bbc25bb940fc52d25101bcf1fbcc4a60.6d61b60d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"_","__idx":4},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connection"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のダイアログが開きます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データ転送に名前を付けて、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200331-191847.490cea31436f6abfee2dbbf9ba1cc8877628c2017c0e39fedf50e839bc192311.6d61b60d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"source-table","__idx":5},"children":["Source Table"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のダイアログが開きます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ソースパラメータを編集して、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200331-205825.b6c7b1431dcb1fe90a3ca2a28e9507ccef368b7d4f718f2404ab4610b9f39289.6d61b60d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200331-191941.156b803358278dab82a2798475a19f9d207c16048e0db26d98c769ce663c861f.6d61b60d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["パラメータ"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["説明"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Export API Endpoint:"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export API呼び出しに使用するエンドポイント。空のままにすると、デフォルト値は",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://data.mixpanel.com/api/2.0/export/"},"children":["https://data.mixpanel.com/api/2.0/export/"]},"です"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JQL API Endpoint"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JQL API呼び出しに使用するエンドポイント。空のままにすると、デフォルト値は",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://mixpanel.com/api/2.0/jql/"},"children":["https://mixpanel.com/api/2.0/jql/"]},"です"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timezone"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プロジェクトのタイムゾーン。PROJECT SETTINGS >> YOUR PROJECT >> OVERVIEWで確認できます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JQL Mode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JQLエンドポイントを使用するか、単にexportエンドポイントを使用するか。デフォルト値はfalseです"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JQL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JQLスクリプト。JQL Modeがtrueの場合のみ有効です"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental Loading"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["転送を増分モードで実行するかどうか"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental Field"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["増分のインデックスとして使用されるフィールド。デフォルト値は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time"]},"です"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From date"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["増分の開始日"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Number of Days to Fetch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["一度にデータを取得する日数の合計"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Number of Days to Slice"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1つのリクエストで取得する日数"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-settings","__idx":6},"children":["Data Settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このページでデータ設定を編集できます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データ設定を編集するか、オプションでこのダイアログページをスキップします。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200331-205910.f234277625ea61950315dda899a5b3add865c944ac5d12c3f5c22882471a0288.6d61b60d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200331-205934.3f7e6cd4df143e81f63184b21ad59f4393eba4b89cdf45399886ab5adf3a1706.6d61b60d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["パラメータ"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["説明"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Backfill Days"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["APIリクエストで使用される最終的な",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from_date"]},"を計算するために",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from_date"]},"から減算される時間。これは、Mixpanelがユーザーデバイス上でデータをキャッシュしてからMixpanelサーバーに送信するためです。Incrementalがtrueで、Incremental Fieldが指定されている場合のみ影響します。デフォルト値は5です"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental Column Upper Limit Delay In Seconds"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["増分カラムの上限。増分カラムでexportを使用する場合、プラグインは増分カラムクエリの上限をジョブ開始時刻でロックします。これは、Mixpanelの処理に遅延がある場合をサポートするためです。Exportエンドポイントのみに影響します。デフォルト値は0です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Allow Partial Import"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プラグインがインポート時のエラーをスキップできるようにします。Exportエンドポイントのみに影響します。デフォルト値はtrueです。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Fetch Custom Properties"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Exportエンドポイント専用のすべてのカスタムプロパティをプラグインがインポートできるようにします。デフォルト値はfalseです。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Events"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Exportエンドポイント専用のデータをフィルタリングするためのイベント"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Filter Expression"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Exportエンドポイント専用のセグメンテーション式"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Bucket"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Exportエンドポイント専用のデータをフィルタリングするためのデータバケット"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schema"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TDテーブルに格納されるカラム名と型を含むスキーマ。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-preview","__idx":7},"children":["Data Preview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポートを実行する前に、Generate Preview を選択してデータの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/batch/import/previewing-your-source-data"},"children":["プレビュー"]},"を表示できます。Data preview はオプションであり、選択した場合はダイアログの次のページに安全にスキップできます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}," を選択します。Data Preview ページが開きます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データをプレビューする場合は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generate Preview"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データを確認します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-placement","__idx":8},"children":["Data Placement"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データの配置について、データを配置したいターゲット database と table を選択し、インポートを実行する頻度を指定します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}," を選択します。Storage の下で、インポートされたデータを配置する新しい database を作成するか、既存の database を選択し、新しい table を作成するか、既存の table を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Database"]}," を選択 > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select an existing"]}," または ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create New Database"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オプションで、database 名を入力します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table"]}," を選択 > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select an existing"]}," または ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create New Table"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オプションで、table 名を入力します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データをインポートする方法を選択します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Append"]}," (デフォルト) - データインポートの結果は table に追加されます。"," ","table が存在しない場合は作成されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always Replace"]}," - 既存の table の全体の内容をクエリの結果出力で置き換えます。table が存在しない場合は、新しい table が作成されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replace on New Data"]}," - 新しいデータがある場合のみ、既存の table の全体の内容をクエリの結果出力で置き換えます。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timestamp-based Partition Key"]}," 列を選択します。"," ","デフォルトキーとは異なるパーティションキーシードを設定したい場合は、long または timestamp 列をパーティショニング時刻として指定できます。デフォルトの時刻列として、add_time フィルターで upload_time を使用します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データストレージの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timezone"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," の下で、このクエリを実行するタイミングと頻度を選択できます。"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"一度だけ実行","__idx":9},"children":["一度だけ実行"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Off"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scheduling Timezone"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create & Run Now"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"定期的に繰り返す","__idx":10},"children":["定期的に繰り返す"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["On"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," を選択します。UI では、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@hourly"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@daily"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@monthly"]},"、またはカスタム ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["cron"]}," の 4 つのオプションが提供されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delay Transfer"]}," を選択して、実行時間の遅延を追加することもできます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scheduling Timezone"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create & Run Now"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["転送が実行された後、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databases"]}," で転送の結果を確認できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"コマンドラインを使用する","__idx":11},"children":["コマンドラインを使用する"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"td-command-v0119以降をインストールする","__idx":12},"children":["'td' Command v0.11.9以降をインストールする"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["最新の",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/td-toolbelt"},"children":["Treasure Data Toolbelt"]},"をインストールします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mixpanel-api認証情報を確認する","__idx":13},"children":["Mixpanel API認証情報を確認する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mixpanelアカウントにログインし、「Account」、次に「Projects」に移動して、APIキーとAPIシークレットを確認します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"シード設定ファイルseedymlを作成する","__idx":14},"children":["シード設定ファイル（seed.yml）を作成する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次のように",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["seed.yml"]},"というファイルを作成します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: mixpanel\n  api_key: MIXPANEL_API_KEY\n  api_secret: MIXPANEL_API_SECRET\n  timezone: 'UTC'\n  from_date: \"2015-10-28\"\n  fetch_days: 1\nout:\n  mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このシードファイルは、カラム名を含む完全な設定ファイルを「推測」するために使用されます。この例では、2015年10月28日の1日分のデータがMixpanelからTreasure Dataにエクスポートされます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["利用可能な",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["out"]},"モードの詳細については、以下の付録を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"フィールドを推測するloadymlを生成する","__idx":15},"children":["フィールドを推測する（load.ymlを生成する）"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["seed.yml"]},"に基づいて、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connector:guess"]},"コマンドで",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]},"を生成します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:guess seed.yml -o load.yml\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["カラム名とタイプは、Mixpanelの設定方法によって異なります。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]},"ファイルは次のようになります："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: mixpanel\n  api_key: MIXPANEL_API_KEY\n  api_secret: MIXPANEL_API_SECRET\n  timezone: UTC\n  from_date: '2015-10-28'\n  fetch_days: 1\n  columns:\n  - name: event\n    type: string\n  - name: \"$browser\"\n    type: string\n  - name: \"$browser_version\"\n    type: long\n  - name: \"$city\"\n    type: string\n  - name: \"$current_url\"\n    type: string\n  - name: \"$initial_referrer\"\n    type: string\n  - name: \"$initial_referring_domain\"\n    type: string\n  - name: \"$lib_version\"\n    type: string\n  - name: \"$os\"\n    type: string\n  - name: \"$referrer\"\n    type: string\n  - name: \"$referring_domain\"\n    type: string\n  - name: \"$region\"\n    type: string\n  - name: \"$screen_height\"\n    type: long\n  - name: \"$screen_width\"\n    type: long\n  - name: ENV\n    type: string\n  - name: RAILS_ENV\n    type: string\n  - name: distinct_id\n    type: long\n  - name: from\n    type: string\n  - name: job_id\n    type: long\n  - name: mp_country_code\n    type: string\n  - name: mp_lib\n    type: string\n  - name: name\n    type: string\n  - name: time\n    type: long\nfilters:\n- type: rename\n  rules:\n  - rule: upper_to_lower\n  - rule: character_types\n    pass_types: [\"a-z\", \"0-9\"]\n    pass_characters: \"_\"\n    replace: \"_\"\n  - rule: first_character_types\n    pass_types: [\"a-z\"]\n    pass_characters: \"_\"\n    prefix: \"_\"\n  - rule: unique_number_suffix\n    max_length: 128\nout:\n  mode: append\nexec: {}\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rename"]},"フィルタの詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/rename-filter-function"},"children":["Data Connectorのrenameフィルタプラグイン"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Connectorは次のようなフィールドを検出しました："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ENV"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["RAILS_ENV"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["$current_url"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["カラム名は、type: renameフィルタセクションで正規化されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"データ読み込みのプレビュー","__idx":16},"children":["データ読み込みのプレビュー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connector:preview"]},"コマンドを使用して、データ読み込みをプレビューします。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:preview load.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データが問題なければ、Mixpanelデータをインポートする先のデータベースとテーブルをTreasure Data上に作成します："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td db:create mixpanel_historical\ntd table:create mixpanel_historical app_name\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"データの読み込み","__idx":17},"children":["データの読み込み"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["読み込みジョブを送信します。データのサイズによっては数時間かかる場合があります。ユーザーは、データが保存されるデータベースとテーブルを指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataのストレージは時間でパーティション分割されているため（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://support.treasuredata.com/hc/en-us/articles/360001480667"},"children":["アーキテクチャ"]},"を参照）、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-column"]},"オプションを指定することを推奨します。このオプションが指定されていない場合、Data Connectorは最初の",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["long"]},"または",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timestamp"]},"カラムをパーティショニング時間として選択します。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-column"]},"で指定するカラムのタイプは、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["long"]},"または",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timestamp"]},"タイプである必要があります。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:issue load.yml --database mixpanel_historical --table app_name --time-column time\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上記のコマンドは、*database(td_sample_db)",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["と"]},"table(td_sample_table)*がすでに作成されていることを前提としています。データベースまたはテーブルがTDに存在しない場合、このコマンドは失敗するため、データベースとテーブルを",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/databases/data-management"},"children":["手動で"]},"作成するか、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:issue"]},"コマンドで",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--auto-create-table"]},"オプションを使用してデータベースとテーブルを自動作成してください："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column created_at --auto-create-table\n"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"\n\"--time-column\" オプションで、Time Format列を「パーティショニングキー」に割り当てることができます。\n\nTreasure Data内のデータに対してSQLクエリを直接実行することで、データが読み込まれたことを確認できます:\n\n```bash\ntd query -T presto -w -d mixpanel_historical 'SELECT COUNT(1) FROM app_name'\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"増分データ読み込みのスケジューリング","__idx":18},"children":["増分データ読み込みのスケジューリング"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mixpanelから完全に移行するのでない限り、Mixpanelデータは定期的にTreasure Dataへ増分読み込みする必要があります。Data Connectorのスケジューリング機能がこの目的に便利です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スケジューリング後、Mixpanel Data Connectorは実行の度に ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from_date"]}," パラメータを ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fetch_days"]}," だけ増加させます。例えば、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]}," での初回実行が"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"from_date: '2015-10-28'\nfetch_days: 1\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["であった場合、次回の実行は以下のようになります:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"from_data: '2015-10-29'\nfetch_days: 1\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アップロード後に ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]}," を更新する必要は",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ありません"]},"。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from_date"]}," フィールドはサーバー側で自動的に更新されるためです。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["毎日アップロードをスケジュールしたいとします。その場合、初回の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from_date"]}," は少なくとも2日前に設定し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]}," で ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fetch_days: 1"]}," を設定してください。次のコマンドで「daily_mixpanel_import」という毎日のジョブが作成され、Treasure Data上の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mixpanel_historical.app_name"]}," に履歴データを毎日読み込みます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:create \\\n    daily_mixpanel_import \\\n    \"10 0 * * *\" \\\n    mixpanel_historical \\\n    app_name \\\n    load.yml \\\n    --time-column time # オプション\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポートの履歴実行は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:history name"]}," で確認できます。例: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:history daily_mixpanel_import"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"増分カラムを使用した増分データ読み込み","__idx":19},"children":["増分カラムを使用した増分データ読み込み"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["一部のMixpanelアカウントでは、Mixpanelがデータを処理した時刻を示す追加フィールドを持つプロジェクトが設定されています。例: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mp_processing_time_ms"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mixpanel Input Pluginに追加パラメータ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incremental_column"]}," を追加できます。実行セッションの最大 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incremental_column"]}," 値が保存され、次回実行時のフィルタとして使用されます。例: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["where incremental_column > previous_run_max_value"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: mixpanel\n  api_key: MIXPANEL_API_KEY\n  api_secret: MIXPANEL_API_SECRET\n  timezone: 'UTC'\n  from_date: \"2015-10-28\"\n  incremental_column: mp_processing_time_ms\n  fetch_days: 1\nout:\n  mode: append\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"でデータをさかのぼる","__idx":20},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["back_fill_days"]}]}," でデータをさかのぼる"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スマートフォンやタブレットなどのデバイスデータの場合、MixpanelはMixpanel Serverに送信する前にユーザーのデバイス内にデータを一時保持することがあります。そのため、クエリに表示されるデータは最大5日遅れることがあります。Mixpanelから増分インポートする際、ユーザーデバイスにキャッシュされているデータを見逃す可能性があります。この問題を解決するには、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["back_fill_days"]}," パラメータ(デフォルトは5)を設定します。プラグインは指定された日数分さかのぼります(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from_date - back_fill_days"]},")。パフォーマンス上の問題により、この機能は incremental_column と一緒にのみ動作します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"で範囲クエリをより小さなapiクエリに分割","__idx":21},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["slice_range"]}]}," で範囲クエリをより小さなAPIクエリに分割"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["場合によっては、返されるデータが大きすぎて、1回のクエリで返されるデータがMixpanelの制限を超え、ジョブが失敗する可能性があります。その場合、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slice_range"]}," 設定パラメータを使用して、大きな範囲クエリを小さなものに分割できます。このパラメータはオプションで、デフォルトは",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["7"]}]},"です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: mixpanel\n  api_key: MIXPANEL_API_KEY\n  api_secret: MIXPANEL_API_SECRET\n  timezone: 'UTC'\n  from_date: \"2015-10-20\"\n  incremental_column: mp_processing_time_ms\n  fetch_days: 6\n  slice_range: 2\nout:\n  mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上記の設定により、[2015-10-20,2015-10-25] の代わりに、次の範囲のクエリが生成されます: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[2015-10-20,2015-10-21],[2015-10-22,2015-10-23],[2015-10-24,2015-10-25]"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"付録","__idx":22},"children":["付録"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"out-pluginのモード","__idx":23},"children":["Out Pluginのモード"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["seed.ymlの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["out"]}," セクションでファイルインポートモードを指定できます。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["append (デフォルト)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これはデフォルトのモードで、レコードはターゲットテーブルに追加されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  ...\nout:\n  mode: append\n"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["replace (td 0.11.10以降)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このモードは、ターゲットテーブル内のデータを置き換えます。ターゲットテーブルに対して手動で行われたスキーマ変更は、このモードでもそのまま保持されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  ...\nout:\n  mode: replace\n"},"children":[]}]},"headings":[{"value":"Mixpanel Import Integration","id":"mixpanel-import-integration","depth":1},{"value":"Treasure コンソールを使用する","id":"treasure-コンソールを使用する","depth":2},{"value":"新しい接続を作成する","id":"新しい接続を作成する","depth":3},{"value":"新しいソースを作成する","id":"新しいソースを作成する","depth":3},{"value":"","id":"_","depth":4},{"value":"Source Table","id":"source-table","depth":4},{"value":"Data Settings","id":"data-settings","depth":3},{"value":"Data Preview","id":"data-preview","depth":3},{"value":"Data Placement","id":"data-placement","depth":3},{"value":"一度だけ実行","id":"一度だけ実行","depth":4},{"value":"定期的に繰り返す","id":"定期的に繰り返す","depth":4},{"value":"コマンドラインを使用する","id":"コマンドラインを使用する","depth":2},{"value":"'td' Command v0.11.9以降をインストールする","id":"td-command-v0119以降をインストールする","depth":3},{"value":"Mixpanel API認証情報を確認する","id":"mixpanel-api認証情報を確認する","depth":3},{"value":"シード設定ファイル（seed.yml）を作成する","id":"シード設定ファイルseedymlを作成する","depth":3},{"value":"フィールドを推測する（load.ymlを生成する）","id":"フィールドを推測するloadymlを生成する","depth":3},{"value":"データ読み込みのプレビュー","id":"データ読み込みのプレビュー","depth":3},{"value":"データの読み込み","id":"データの読み込み","depth":3},{"value":"増分データ読み込みのスケジューリング","id":"増分データ読み込みのスケジューリング","depth":3},{"value":"増分カラムを使用した増分データ読み込み","id":"増分カラムを使用した増分データ読み込み","depth":3},{"value":"でデータをさかのぼる","id":"でデータをさかのぼる","depth":4},{"value":"で範囲クエリをより小さなAPIクエリに分割","id":"で範囲クエリをより小さなapiクエリに分割","depth":4},{"value":"付録","id":"付録","depth":2},{"value":"Out Pluginのモード","id":"out-pluginのモード","depth":3}],"frontmatter":{"seo":{"title":"Mixpanel Import Integration"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/mixpanel-import-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}