{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Stripe 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":"stripe-import-integration","__idx":0},"children":["Stripe Import Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このData Connectorを使用すると、StripeオブジェクトをTreasure Dataにインポートできます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure Dataの基本知識"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Stripeの基本知識"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["(オプション) ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://stripe.com/docs/webhooks"},"children":["Stripe Webhooks"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールの使用","__idx":2},"children":["Treasure コンソールの使用"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しい接続の作成","__idx":3},"children":["新しい接続の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Integrations Hub > Catalogに移動し、Stripeを検索して選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133322.f1708963c0ac8dd299ee959b769a54a39b15cf76356100d24b5893fbc65345b0.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth認証方式をサポートしています："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stripe用の既存のOAuth接続を選択するか、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OAuth connection"]},"の下にあるリンクを選択して新しい接続を作成します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133342.a875b907d8c2aa56d61c432ccee952f62378e7081eed99e525ab15cb1085af54.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しいoauth接続の作成","__idx":4},"children":["新しいOAuth接続の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stripeアカウントにログインします："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133350.82d72fafa3becdba0d1fdc9d46f64755c0abebc282647bcb9c427f97d21a0f66.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Treasure Data"]},"アプリへのアクセスを許可します："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133409.e0bf18be978ea7127fcff40cc5b34d52ba8fd94d288614dbdcd6f329984a9519.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Integrations Hubにリダイレクトされます。新しい接続の作成を繰り返し、新しいOAuth接続を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133418.35874dd688f32173c32059f02fc3361691877c27ccd171236e3ebb1338ebd154.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["内部テスト目的：Secret Key — 非推奨、OAuthに置き換えられました"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stripe > Your Account > Account Settings > API KeysからLive Secret Keyを入力します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133427.774f5d51765bb957b76a6cab4a28facdff4a98609859a05cb29cabfab4844b06.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しい転送の作成","__idx":5},"children":["新しい転送の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上記の接続を作成すると、自動的に",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.treasuredata.com/connections/list"},"children":["My Connections"]},"タブに移動します。作成した接続を探してNew Transferを選択します。インクリメンタルオプションはeventオブジェクトのみサポートされています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191205-052042.d421627101de63282c5920ea15cd9600ec0e204a770542af27a0df7040f5743c.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["詳細を編集して",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Next"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133440.1a99949fe468212897207154efde3446e64625b4288e7c39a0c7169c9d4befb2.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データをプレビューします。何か変更したい場合は、Advanced Settingsを選択し、そうでなければNextを選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133521.10a8b688daddbc643113e510c9f3f9d8189ee64c197f495294ef5c165fd5eaac.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次のダイアログに従って、データを転送するデータベースとテーブルを選択します："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133627.f4a5e23e14b8d06eca32a7cae13a648a5e9c9ba0aa8d4de9a45ef94a7a262064.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のダイアログを使用してデータ転送のスケジュールを指定し、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Start Transfer"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133636.27a41d1bc0e053eca5eb3ae38f5a502276876a78a780c9d760fef9487a78485e.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["My Input Transfersタブの下に進行中の新しいデータ転送が表示され、対応するジョブがJobsセクションにリストされます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"並列データインポート","__idx":6},"children":["並列データインポート"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["並列インポート"]},"を使用してデータインポートのパフォーマンスを向上させることができます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["プラグインは、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Start datetime"]},"と",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["End datetime"]},"に依存する時間範囲を作成し、Stripe APIに並列HTTPリクエストを送信します。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["End datetime"]},"を編集しない場合、プラグインはまずStripeに保存されている最新レコードのタイムスタンプを取得し、それを",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["End datetime"]},"として使用しようとします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例では、プラグインは4つの時間範囲を作成し、すべての時間範囲が並列で処理されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Start datetime: 2016-01-25T00:00:00\nEnd datetime: 2017-05-25T00.00.00\nTime splitting\n  Period for each parallel input: 6\n  unit: month\n\nTime range 1\n  gte: 2016-01-25T00:00:00\n  lt: 2016-01-31T00:00:00 # start_datetime to first end of the month\nTime range 2\n  gte: 2016-01-31T00:00:00 # has 6 month period\n  lt: 2016-07-31T00.00.00\nTime range 3\n  gte: 2016-07-31T00.00.00.000Z # has 6 month period\n  lt: 2017-02-28T00.00.00\nTime range 4\n  gte: 2017-02-28T00.00.00\n  lt: 2017-05-25T00.00.00 # to end_datetime\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133657.4ffb2d73758eeac183b574feb33f56b47978d8c37188e36799538b8e46d7baae.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"コマンドラインの使用","__idx":7},"children":["コマンドラインの使用"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tdコマンド-v0119以降のインストール","__idx":8},"children":["'td'コマンド v0.11.9以降のインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["最新の",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["TD Toolbelt"]},"をインストールできます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td --version\n0.15.0\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"設定ファイルの作成","__idx":9},"children":["設定ファイルの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stripeアカウントのアクセス情報を使用して、次のような設定ファイル（例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]},"）を準備します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: stripe\n  client_id: xxxxxxxxxxxxx\n  client_secret: xxxxxxxxxxxxx\n  refresh_token: xxxxxxxxxxxxx\n  target: event\n  incremental: true\n  start_datetime: 2017-01-01T07:36:22.000Z\n  formula: gt\nout:\n  mode: replace\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stripe ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Event"]},"オブジェクトのインポートを指定する手順は次のとおりです："]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["client_idとclient_secret: StripeアプリのクレデンシャルID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["refresh_token: Stripe OAuth2 refresh_token、Stripeユーザーアカウントを使用してStripeアプリへのアクセスを許可する必要があります"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["target: インポートしたいStripeオブジェクト。サポートされる値：account、application_fee、balance_history、charge、coupon、customer、dispute、file_upload、event、invoice_item、invoice、order、plan、product、refund、subscription、transfer"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["start_datetime: この日付からデータをインポート、形式は：yyyy-MM-ddThh:mm:ss.000Z"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["formula: start_datetimeを評価する式。サポートされる値：gt（より大きい）、gte（以上）、lt（より小さい）、lte（以下）。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["incremental: データインポートを継続的に行うか一度だけ行うか、デフォルトはtrue。インクリメンタルはtargetがeventの場合のみサポートされます。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["利用可能なoutモードの詳細については、付録を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"インポートするデータのプレビューオプション","__idx":10},"children":["インポートするデータのプレビュー（オプション）"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コマンドtd 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":"Heading","attributes":{"level":3,"id":"ロードジョブの実行","__idx":11},"children":["ロードジョブの実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ロードジョブを送信します。データサイズによっては数時間かかる場合があります。ユーザーは、データが保存されるデータベースとテーブルを指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataのストレージは時間でパーティション分割されているため、--time-columnオプションを指定することをお勧めします（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/data-partitioning-in-treasure-data"},"children":["データパーティション分割"]},"も参照してください）。オプションが指定されていない場合、Data Connectorは最初のlong型またはtimestamp型の列をパーティション分割時間として選択します。--time-columnに指定する列の型は、long型またはtimestamp型のいずれかである必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データに時間列がない場合は、add_timeフィルターオプションを使用して追加できます。詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/add_time-filter-function"},"children":["add_timeフィルタープラグイン"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column updated_date\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":"https://docs.treasuredata.com/smart/project-product-documentation/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":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column updated_date --auto-create-table\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["\"--time-column\"オプションを使用して、Time Format列を\"Partitioning Key\"に割り当てることができます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スケジュール実行","__idx":12},"children":["スケジュール実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["定期的なStripeインポートのために、定期的なData Connector実行をスケジュールできます。高可用性を確保するためにスケジューラーを管理しています。この機能を使用すると、ローカルデータセンターに",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cron"]},"デーモンを用意する必要がなくなります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["新しいスケジュールは、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:create"]},"コマンドを使用して作成できます。スケジュールの名前、cron形式のスケジュール、データが保存されるデータベースとテーブル、およびData Connector設定ファイルが必要です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td connector:create\n    daily_stripe_import\n    \"10 0 * * *\"\n    td_sample_db\n    td_sample_table\n    load.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cron"]},"パラメータは、次の3つのオプションも受け入れます：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@hourly"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@daily"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@monthly"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトでは、スケジュールはUTCタイムゾーンで設定されます。-tまたは--timezoneオプションを使用して、タイムゾーンでスケジュールを設定できます。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--timezone"]},"オプションは、'Asia/Tokyo'、'America/Los_Angeles'などの拡張タイムゾーン形式のみをサポートします。PST、CSTなどのタイムゾーン略語は",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["サポートされておらず"]},"、予期しないスケジュールになる可能性があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"stripe-webhooksのセットアップ","__idx":13},"children":["Stripe Webhooksのセットアップ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhooksを使用すると、直接APIリクエストを介してではなく、Stripeアカウントで発生するイベントをキャプチャできます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stripeアカウントにログインし、Webhooks —> Settings —> Add endpointを選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-133955.0879b08a954ec38e5cfaf929de2e1892b021dda355faea5a5109159d084d7f45.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["URLテキストボックスに次のように入力します："," ","http://in.treasuredata.com/postback/v3/event/{td_database}/{td_table}?td_write_key={td_account_write_api_key}"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次に、前述のURLで指定された{td_database}.{td_table}に取り込みたいイベントを選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191022-134004.b94faca136abe830b97bb137c603bea498f2b2c0927c4b268ba6b2a283b7d47c.b009b112.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["異なるタイプのイベントを異なる{td_database}.{td_table}に取り込むために、追加のエンドポイントをセットアップできます。"]}]},"headings":[{"value":"Stripe Import Integration","id":"stripe-import-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"Treasure コンソールの使用","id":"treasure-コンソールの使用","depth":2},{"value":"新しい接続の作成","id":"新しい接続の作成","depth":3},{"value":"新しいOAuth接続の作成","id":"新しいoauth接続の作成","depth":3},{"value":"新しい転送の作成","id":"新しい転送の作成","depth":3},{"value":"並列データインポート","id":"並列データインポート","depth":3},{"value":"コマンドラインの使用","id":"コマンドラインの使用","depth":2},{"value":"'td'コマンド v0.11.9以降のインストール","id":"tdコマンド-v0119以降のインストール","depth":3},{"value":"設定ファイルの作成","id":"設定ファイルの作成","depth":3},{"value":"インポートするデータのプレビュー（オプション）","id":"インポートするデータのプレビューオプション","depth":3},{"value":"ロードジョブの実行","id":"ロードジョブの実行","depth":3},{"value":"スケジュール実行","id":"スケジュール実行","depth":3},{"value":"Stripe Webhooksのセットアップ","id":"stripe-webhooksのセットアップ","depth":2}],"frontmatter":{"seo":{"title":"Stripe Import Integration"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/stripe-import-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}