{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Twitter Tweet Insights Import Integration","description":"TwitterからTweets、Retweets、Follower IDsなどをTreasure AIにインポートするための設定手順と認証方法を解説します。Twitter API v1.1を使用した統合方法を詳しく説明します。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"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":"twitter-tweet-insights-import-integration","__idx":0},"children":["Twitter Tweet Insights Import Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TwitterからTweets、Retweets、Follower IDs、Follower List、またはUser Timelineを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":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["Toolbelt"]},"を含むTreasure Dataの基本知識"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["consumer keyとconsumer secretを持つTwitter開発者アプリケーション"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Twitter開発環境でTreasure Dataが設定されていること。以下を参照してください:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.twitter.com/en/docs/basics/authentication/overview/application-only"},"children":["https://developer.twitter.com/en/docs/basics/authentication/overview/application-only"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.twitter.com/en/docs/basics/authentication/overview/application-only#issuing-application-only-requests"},"children":["https://developer.twitter.com/en/docs/basics/authentication/overview/application-only#issuing-application-only-requests"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["認証されたTreasure アカウントへのアクセス"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["当社のConnectorは、Twitter API access levelとしてElevated accessを必要とするTwitter API v1.1を使用します。",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api"},"children":["https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["2021年11月15日以前に開発者アカウントの承認を受けた場合、自動的にElevated accessに変換されています。これは、既存のAppsを引き続き使用してstandard v1.1、premium v1.1、およびenterpriseエンドポイントへのリクエストを行うことができ、すべてのユーザーAccess Tokenが引き続き有効であることを意味します。"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-data用のtwitter開発環境を確立する","__idx":2},"children":["Treasure Data用のTwitter開発環境を確立する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Twitterで、Treasure Dataにインポートするために使用するアプリを指定します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TwitterからTreasure Dataへの認証フローは、一般的に以下の通りです:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure Dataは、認証情報をbearer tokenと交換するために、POST oauth2 / tokenエンドポイントにリクエストを送信します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["REST APIにアクセスする際、Treasure Dataはbearer tokenを使用して認証します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"twitterでの設定","__idx":3},"children":["Twitterでの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Twitterアカウント名でログインします。Appsに移動して、consumer keyとconsumer secretを取得します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-181945.0122e07a3b81a67dac23a939f5c81054c51a96f4a044c5c1aa8c1d5e7fbcb039.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ダッシュボードに戻ります。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Account"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dev Environments"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-181954.80e9a59ead7c72202b4c1ec591bd109f86552b0737ed22519fcc892acba04a33.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Search Tweets 30-Days"]},"ラベルと",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Search Tweets Full-Archive"]},"ラベルを選択します。これにより、データのインポートに使用されるTwitter検索エンドポイントAPIを指定しています。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.twitter.com/en/docs/tweets/search/overview"},"children":["詳細については、30日および全アーカイブ検索に関するTwitterのドキュメントを参照してください"]},"。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182008.077ffee363efdf28a571cc0a2220fd71c8c995938fd76c5f3e383ecf6fd47af4.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールを使用して接続を作成する","__idx":4},"children":["Treasure コンソールを使用して接続を作成する"]},{"$$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"},"children":["Treasure Data Connections"]},"に移動し、Tweet Insightsを検索して選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182017.06db822cff835bec621440d3659460fc16dc026abff229a80432b64e26125f89.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]},"を選択して、認証済み接続を作成します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のダイアログが開きます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182033.f75d857c532693c1cf9c50aecac6265e40208ed3b44e33d39c0ae077817c736e.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Twitter Appから取得したconsumer keyとconsumer secretを編集します。Twitter Paid Premium Accountかどうかを指定します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182045.8c8021a235b2f5e0b29790a94d1b7c4282e2333e46f3fd047fa8e7e7ac86cc5f.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["新しいTwitter Tweet Insights Connectionに名前を付けます。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"を選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"twitter-tweet-insightsデータをtreasure-dataに転送する","__idx":6},"children":["Twitter Tweet InsightsデータをTreasure Dataに転送する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接続を作成すると、自動的に",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.treasuredata.com/connections/list"},"children":["Authentications"]},"タブに移動します。作成した接続を探して、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Source"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポートするデータを指定します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ハンドルからtweetsをインポートする","__idx":7},"children":["ハンドルからTweetsをインポートする"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182102.f5b8fcb678a668bda0fa68c7a4656d3900252caa45902a0936b0f71afc2de8b2.cdc70e98.png","alt":""},"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":["Data Type:"]}," Tweets(デフォルト)またはAccount"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Object to Import:"]}," データタイプがTweetsの場合: All TweetsまたはRetweets。データタイプがAccountの場合: User Timeline、Follower IDs、またはFollower List"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["30-day dev environment"]},": 過去30日間のTweetsまたはRetweetsを検索するためのTwitter開発環境APIラベル。Accountデータタイプには適用されません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Full archive dev environment"]},": アーカイブされたTweetsまたはRetweetsの完全検索用の開発環境APIラベル。Accountデータタイプには適用されません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From this screen name or handle"]},": 必須。値は、ユーザーのTwitter数値アカウントIDまたはTwitterアカウントのユーザー名である必要があります。クエリ対象のデータを指定するために使用します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Include videos"]},": ビデオリンクを含むTweetsのみをインポートします。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From Date"]},": この時刻以降に作成されたTweetsをインポートします。時刻はUTCで設定されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["To Date"]},": この時刻までに作成されたTweetsをインポートします。時刻はUTCで設定されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental"]},": スケジュールに基づいてインポートする場合、取得されるデータの時間枠は実行ごとに自動的に前進します。たとえば、初期設定が1月1日で期間が10日の場合、最初の実行では1月1日から1月10日までに変更されたデータを取得し、2回目の実行では1月11日から1月20日までを取得する、という具合になります。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ハンドルからretweetsをインポートする","__idx":8},"children":["ハンドルからRetweetsをインポートする"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182117.dd81b2ceb2a51d9a3cc67180c1815f372991b1a1d97486b063fb25ca0dc621fb.cdc70e98.png","alt":""},"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":["Retweets of this screen name/handle"]},": Twitterアカウントのユーザー名"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Include videos"]},": ビデオを含むRetweetsのみをインポートします。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["From Date"]},": この時刻以降に作成されたRetweetsをインポートします。時刻はUTCで設定されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["To Date"]},": この時刻までに作成されたRetweetsをインポートします。時刻はUTCで設定されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental"]},": スケジュールに基づいてインポートする場合、取得されるデータの時間枠は実行ごとに自動的に前進します。たとえば、初期設定が1月1日で期間が10日の場合、最初の実行では1月1日から1月10日までに変更されたデータを取得し、2回目の実行では1月11日から1月20日までを取得する、という具合になります。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ハンドルのuser-timelineをインポートする","__idx":9},"children":["ハンドルのUser Timelineをインポートする"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182131.1633d00f67171e3a127e6c16da0c598815633ea36cf786849e71e39e5ed0cd39.cdc70e98.png","alt":""},"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":["From this screen name/handle"]},": Twitterアカウントのユーザーネーム"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental"]},": スケジュールに基づいてインポートする場合、取得したデータのTweetの最大IDは各実行時に自動的に前進します。例えば、初期設定の最大IDが1の場合、最初の実行でデータを取得し、返されたTweetの最大IDが100の場合、2回目の実行はID 100から取得し、2回目の実行で返された最大IDでIDを設定します。以降も同様です。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"import-follower-ids-of-handle","__idx":10},"children":["Import Follower IDs of handle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182144.b545858dafa7685033b992db6586074f869455d4c8fd03c75c021c60310149a0.cdc70e98.png","alt":""},"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":["From this screen name/handle"]},": Twitterアカウントのユーザーネーム"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"import-follower-list-of-handle","__idx":11},"children":["Import Follower List of handle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182155.0da0a6925d42b749ab02e7076895b9e56b4ffa95757ab88af9f97ac8a5ab8c2f.cdc70e98.png","alt":""},"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":["From this screen name/handle"]},": Twitterアカウントのユーザーネーム"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定が完了したら、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]},"を選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"preview","__idx":12},"children":["Preview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/about-data-preview"},"children":["プレビュー"]},"が表示されます。変更を加える場合は",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Advanced Settings"]},"を選択し、それ以外の場合は",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182226.ee4ee536dfd3325463fe40f1946139eaa7f013224ffc78450b9f233e4d27e610.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"advanced-settings","__idx":13},"children":["Advanced Settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182235.b40fe4bd87d1418d7a6693ac8f838aa198bcb217951f1e371af7087d76f9ba81.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のパラメータを指定できます:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maximum retry times. 各API呼び出しの最大リトライ回数を指定します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"  Type: number\n  Default: 7\n"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initial retry interval millisecond. 最初のリトライの待機時間を指定します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"  Type: number\n  Default: 1000\n"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maximum retry interval milliseconds. リトライ間の最大待機時間を指定します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"  Type: number\n  Default: 120000\n"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"choose-the-target-database-and-table","__idx":14},"children":["Choose the target database and table"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["既存のデータベースとテーブルを選択するか、新しいデータベースとテーブルを作成します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182247.61f690241468610391783757953bc91da6b756d027bda646cae01b5571ee28e5.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["新しいデータベースを作成し、データベースに名前を付けます。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create new table"]},"についても同様の手順を実行します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["既存のテーブルにレコードを",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["追加"]},"するか、既存のテーブルを",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["置換"]},"するかを選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトキーではなく、異なる",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["partition key seed"]},"を設定したい場合は、ポップアップメニューを使用して指定できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"scheduling","__idx":15},"children":["Scheduling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["When"]},"タブでは、1回限りの転送を指定するか、自動化された定期転送をスケジュールすることができます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["パラメータ"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Once now"]},": 1回限りのジョブを設定します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Repeat…"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},": ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@hourly"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@daily"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@monthly"]},"の3つのオプションとカスタム",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["cron"]},"を指定できます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delay Transfer"]},": 実行時間の遅延を追加します。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TimeZone"]},": 'Asia/Tokyo'のような拡張タイムゾーン形式をサポートします。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182257.4a061c0109a8dbfe17c35acc4ec94e9c15fd1010c16e0c6e946c6001a881876b.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"details","__idx":16},"children":["Details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["転送に名前を付けて",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"を選択し、開始します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191104-182305.55fbca55be070bc5e08baeb2ae7b6c7a96a4084c2dd0b6d1fcbfda38fb9ac048.cdc70e98.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["転送が実行された後、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databases"]},"タブで転送結果を確認できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-the-command-line-to-create-your-twitter-tweet-insights-connection","__idx":17},"children":["Use the Command Line to create your Twitter Tweet Insights connection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソールを使用して接続を設定できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"install-the-treasure-data-toolbelt","__idx":18},"children":["Install the Treasure Data Toolbelt"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["最新の",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["Treasure Data Toolbelt"]},"をインストールします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-configuration-file-loadyml","__idx":19},"children":["Create a Configuration File (load.yml)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定ファイルには、Twitter Tweet Insightsからコネクタに入力される内容を指定するin:セクションと、コネクタがTreasure Dataのデータベースに出力する内容を指定するout:セクションが含まれます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例は、インクリメンタルスケジューリングなしでツイートをインポートする方法を示しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: twitter_tweet_insights\n  comsumer_key: xxxxxxxx\n  comsumer_secret: xxxxxxxx\n  is_paid_account: false\n  data_type: tweets\n  tweet_type: all\n  30_day_env: xxxxxxxx\n  full_archive_env: xxxxxxxx\n  handle: xxxxxxxx\n  include_video: false\n  from_date: 2019-01-17T00:00:00.000Z\n  to_date: 2019-01-27T00:00:00.000Z\n  tweet_incremental: false\nout:\n mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例は、インクリメンタルスケジューリングありでツイートをインポートする方法を示しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n type: twitter_tweet_insights\n comsumer_key: xxxxxxxx\n comsumer_secret: xxxxxxxx\n is_paid_account: false\n data_type: tweets\n tweet_type: all\n 30_day_env: xxxxxxxx\n full_archive_env: xxxxxxxx\n handle: xxxxxxxx\n include_video: false\n from_date: 2019-01-17T00:00:00.000Z\n to_date: 2019-01-27T00:00:00.000Z\n tweet_incremental: true\nout:\n mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例は、インクリメンタルスケジューリングなしでリツイートをインポートする方法を示しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n type: twitter_tweet_insights\n comsumer_key: xxxxxxxx\n comsumer_secret: xxxxxxxx\n is_paid_account: false\n data_type: tweets\n tweet_type: retweets\n 30_day_env: xxxxxxxx\n full_archive_env: xxxxxxxx\n handle_retweet: xxxxxxxx\n include_video: false\n from_date: 2019-01-17T00:00:00.000Z\n to_date: 2019-01-27T00:00:00.000Z\n tweet_incremental: false\nout:\n mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例は、インクリメンタルスケジューリングありでリツイートをインポートする方法を示しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n type: twitter_tweet_insights\n comsumer_key: xxxxxxxx\n comsumer_secret: xxxxxxxx\n is_paid_account: false\n data_type: tweets\n tweet_type: retweets\n 30_day_env: xxxxxxx\n full_archive_env: xxxxxxxx\n handle_retweet: xxxxxxxx\n include_video: false\n from_date: 2019-01-17T00:00:00.000Z\n to_date: 2019-01-27T00:00:00.000Z\n tweet_incremental: true\nout:\n mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例は、インクリメンタルスケジューリングなしでユーザータイムラインをインポートする方法を示しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n type: twitter_tweet_insights\n comsumer_key: xxxxxxxx\n comsumer_secret: xxxxxxxx\n is_paid_account: false\n data_type: account\n account_type: user\n account_label: xxxxxxxx\n account_incremental: false\nout:\n mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例は、増分スケジューリングを使用してユーザータイムラインをインポートする方法を示しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n type: twitter_tweet_insights\n comsumer_key: xxxxxxxx\n comsumer_secret: xxxxxxxx\n is_paid_account: false\n data_type: account\n account_type: user\n account_label: xxxxxxxx\n account_incremental: true\nout:\n mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例は、フォロワーIDをインポートする方法を示しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n type: twitter_tweet_insights\n comsumer_key: xxxxxxxx\n comsumer_secret: xxxxxxxx\n is_paid_account: false\n data_type: account\n account_type: id\n account_label: xxxxxxxx\nout:\n mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例は、フォロワーリストをインポートする方法を示しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n type: twitter_tweet_insights\n comsumer_key: xxxxxxxx\n comsumer_secret: xxxxxxxx\n is_paid_account: false\n data_type: account\n account_type: list\n account_label: xxxxxxxx\nout:\n mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"インポートするデータのプレビューオプション","__idx":20},"children":["インポートするデータのプレビュー（オプション）"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:preview"]},"コマンドを使用して、インポートするデータをプレビューできます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:preview load.yml\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ロードジョブの実行","__idx":21},"children":["ロードジョブの実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ジョブを実行するには、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:issue"]},"を使用します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ロードジョブを実行する前に、データを保存するデータベースとテーブルを指定する必要があります。例：td_sample_db、td_sample_table"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml \\\n     --database td_sample_db \\\n     --table td_sample_table \\\n     --time-column date_time_column\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataのストレージは時間によってパーティション分割されているため、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-column"]},"オプションを指定することを推奨します。このオプションが指定されていない場合、データコネクターは最初のlong型またはtimestamp型のカラムをパーティショニング時間として選択します。--time-columnで指定するカラムの型は、long型またはtimestamp型である必要があります（プレビュー結果を使用して、利用可能なカラム名と型を確認してください。一般的に、ほとんどのデータ型にはlast_modified_dateカラムがあります）。"]},{"$$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 filter"]},"プラグインを参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:issue"]},"は、データベース（sample_db）とテーブル（sample_table）がすでに作成されていることを前提としています。データベースまたはテーブルがTDに存在しない場合、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:issue"]},"は失敗します。そのため、データベースとテーブルを手動で作成するか、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:issue"]},"の--auto-create-tableオプションを使用してデータベースとテーブルを自動的に作成する必要があります。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":" $ td connector:issue load.yml \\\n      --database td_sample_db \\\n      --table td_sample_table \\\n      --time-column date_time_column \\\n      --auto-create-table\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コマンドラインからロードジョブを送信します。データサイズによっては、処理に数時間かかる場合があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"付録","__idx":22},"children":["付録"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"サンドボックスアプリケーションの制限事項","__idx":23},"children":["サンドボックスアプリケーションの制限事項"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["サンドボックスアカウントのMaxResultsパラメータは100ですが、プレミアムは500です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["リクエストレート制限は、分単位と秒単位の両方の粒度で適用されます。分単位のレート制限は、1分あたり30リクエストです。リクエストは1秒あたり10リクエストにも制限されます。リクエストは、dataエンドポイントとcountsエンドポイントの両方で集計されます。月単位のリクエスト制限も適用されます。サンドボックス環境は、月あたり250リクエストに制限されています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ユーザーは、リクエストの使用状況と月次クォータについて、アプリケーションダッシュボードを確認する必要があります。"]}]},"headings":[{"value":"Twitter Tweet Insights Import Integration","id":"twitter-tweet-insights-import-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"Treasure Data用のTwitter開発環境を確立する","id":"treasure-data用のtwitter開発環境を確立する","depth":2},{"value":"Twitterでの設定","id":"twitterでの設定","depth":2},{"value":"Treasure コンソールを使用して接続を作成する","id":"treasure-コンソールを使用して接続を作成する","depth":2},{"value":"新しい接続を作成する","id":"新しい接続を作成する","depth":3},{"value":"Twitter Tweet InsightsデータをTreasure Dataに転送する","id":"twitter-tweet-insightsデータをtreasure-dataに転送する","depth":3},{"value":"ハンドルからTweetsをインポートする","id":"ハンドルからtweetsをインポートする","depth":3},{"value":"ハンドルからRetweetsをインポートする","id":"ハンドルからretweetsをインポートする","depth":3},{"value":"ハンドルのUser Timelineをインポートする","id":"ハンドルのuser-timelineをインポートする","depth":3},{"value":"Import Follower IDs of handle","id":"import-follower-ids-of-handle","depth":3},{"value":"Import Follower List of handle","id":"import-follower-list-of-handle","depth":3},{"value":"Preview","id":"preview","depth":3},{"value":"Advanced Settings","id":"advanced-settings","depth":3},{"value":"Choose the target database and table","id":"choose-the-target-database-and-table","depth":3},{"value":"Scheduling","id":"scheduling","depth":3},{"value":"Details","id":"details","depth":3},{"value":"Use the Command Line to create your Twitter Tweet Insights connection","id":"use-the-command-line-to-create-your-twitter-tweet-insights-connection","depth":2},{"value":"Install the Treasure Data Toolbelt","id":"install-the-treasure-data-toolbelt","depth":3},{"value":"Create a Configuration File (load.yml)","id":"create-a-configuration-file-loadyml","depth":3},{"value":"インポートするデータのプレビュー（オプション）","id":"インポートするデータのプレビューオプション","depth":3},{"value":"ロードジョブの実行","id":"ロードジョブの実行","depth":3},{"value":"付録","id":"付録","depth":2},{"value":"サンドボックスアプリケーションの制限事項","id":"サンドボックスアプリケーションの制限事項","depth":3}],"frontmatter":{"seo":{"title":"Twitter Tweet Insights Import Integration","description":"TwitterからTweets、Retweets、Follower IDsなどをTreasure AIにインポートするための設定手順と認証方法を解説します。Twitter API v1.1を使用した統合方法を詳しく説明します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/twitter-tweet-insights-import-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}