{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Tableau Server Export Integration CLI","description":"Tableau Serverへのデータエクスポート用CLI。ユーザー名/パスワードおよびPAT認証を使用して、クエリ結果を簡単にTableau Serverにエクスポートする方法を説明します。","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/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"tableau-server-export-integration-cli","__idx":0},"children":["Tableau Server Export Integration CLI"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ワンタイムクエリのcli使用方法","__idx":1},"children":["ワンタイムクエリのCLI使用方法"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"json形式の設定","__idx":2},"children":["JSON形式の設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この方法を推奨します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td query"]},"コマンドの",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-r"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["—result"]},"オプションを使用してTableauの結果出力先を追加します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["認証モード: Username/Password"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td query -d mydb -r '{\"type\":\"tableau\",\"host\":\"my.tableauserver.com\", \"auth_method\":\"password\", \"username\":\"my_user\", \"password\":\"passw0rd\", \"ssl\":true, \"ssl_verify\":false, \"server_version\":\"10.0\", \"datasource\":\"my_ds\", \"site\":\"\",\"project\":\"\", \"mode\":\"replace\", \"chunk_size_in_mb\":50, \"timezone\":\"PST\"}' 'SELECT * FROM access'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["認証モード: PAT"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$  td query -d mydb -r '{\"type\":\"tableau\",\"host\":\"my.tableauserver.com\", \"auth_method\":\"pat\", \"pat_name\":\"pat_name\", \"pat_secret\":\"pat_secret\", \"ssl\":true, \"ssl_verify\":false, \"server_version\":\"10.0\", \"datasource\":\"my_ds\", \"site\":\"\",\"project\":\"\", \"mode\":\"replace\", \"chunk_size_in_mb\":50, \"timezone\":\"PST\"}' 'SELECT * FROM access'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"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":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["auth_method"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["認証方法。サポートされる値: 'password', 'pat'"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["username"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tableau ServerのUsername(auth_methodがpasswordの場合に必須)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["password"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tableau ServerのPassword(auth_methodがpasswordの場合に必須)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["pat_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Personal Access Token Name(auth_methodがpatの場合に必須)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["pat_secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Personal Access Token Secret(auth_methodがpatの場合に必須)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["host"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tableau ServerのHostname"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["datasource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["サインインするサイトのURL(オプション)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["site"]},"属性の値を確認するには、Tableau Serverにサインインし、URLの",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/site/"]},"の後に表示される値を確認してください。例えば、以下のURLの場合、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["site"]},"値は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MarketingTeam"]},"です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://MyServer/#/site/MarketingTeam/projects"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["site"]},"属性が空文字列の場合、デフォルトサイトにサインインされます。サインイン時にサイトを指定しない場合でも、常に特定のサイトにサインインされます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tableau Serverの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#Sign_In?TocPath=API%2520Reference%7C_____89"},"children":["REST APIリファレンス"]},"をご覧ください。"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["chunk_size_in_mb"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["毎回アップロードするチャンクファイルサイズ(MB単位)、デフォルト: 200、最小: 100、最大: 1024"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["read_timeout_millis"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["レスポンスを待機する時間(最大: 7200000)。ミリ秒単位の値"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["error_when_timeout"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TrueまたはFalse。trueの場合、データソース公開のタイムアウト時に実行中のジョブが失敗します"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["timezone"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TimestampデータタイプからTableau DateTimeデータタイプへの変換に使用するTimezone、デフォルト: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UTC"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"url形式の設定","__idx":3},"children":["URL形式の設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この方法は推奨されません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例に示すように、Tableauの結果出力先をJSON形式からURL形式に変更します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td query -d mydb -r 'tableau://username:password@my.tableauserver.com/?mode=replace' 'SELECT * FROM access'\n$ td query -d mydb -r 'tableau://username:password@my.tableauserver.com:8443/?mode=replace&ssl=true' 'SELECT * FROM access'\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ワンタイムクエリのtreasure-コンソール使用方法","__idx":4},"children":["ワンタイムクエリのTreasure コンソール使用方法"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure コンソールを開きます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["クエリエディタに移動します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["クエリを入力します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のクエリ例では、アクセスログのサンプルデータセットを使用し、1日ごとのHTTPメソッドの分布を計算します。便宜上、DatetimeカラムをString型からTIMESTAMP型にキャストしてTableauで使用します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HIVE:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT\n  CAST(TD_TIME_FORMAT(time, \"yyyy-MM-dd 00:00:00\") AS TIMESTAMP) AS \"dates\",\n  method AS `Method`,\n  COUNT(1) AS `Count`\nFROM\n  www_access\nGROUP BY\n  TD_TIME_FORMAT(time, \"yyyy-MM-dd 00:00:00\"),\n  method\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PRESTO:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PRESToクエリでは、便宜上TD_TIME_STRINGの代わりにTD_TIME_FORMATを使用することを推奨します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT\n  CAST(TD_TIME_FORMAT(time, 'yyyy-MM-dd 00:00:00') AS TIMESTAMP) AS \"dates\",\n  method AS `Method`,\n  COUNT(1) AS `Count`\nFROM\n  www_access\nGROUP BY\n  TD_TIME_FORMAT(time, 'yyyy-MM-dd 00:00:00'),\n  method\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tableau Serverを開きます。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["左上のバーで",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Sources"]},"を選択します。"," ","TDEファイルを含むデータソースのリストが表示されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191016-211351.4667974c17c9a7ad2b16ec3fa12ae3453e5576c4dfab1e36e504503afa74d386.94b6a600.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Workbook"]},"を選択して、ブラウザからチャートとダッシュボードを作成します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["左側のナビゲーションからディメンションとメジャーを右上のナビゲーションにドラッグアンドドロップしてグラフを作成します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]},"を選択して結果を保存します。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191016-211405.b7e75000b994c7c8d8934d01ccfa61923fde5012ba00c349524743454b4bc781.94b6a600.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールを使用したクエリ更新のスケジュール設定","__idx":5},"children":["Treasure コンソールを使用したクエリ更新のスケジュール設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スケジュールジョブ機能を使用してデータセットを更新できます。この機能により、Treasure Dataでクエリを定期的に実行し、Tableau Server上のTDEファイルを更新できます。スケジュールはクエリエディタから指定できます。TD_SCHEDULED_TIME() UDFを",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["append"]},"モードで使用すると便利です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のクエリは、クエリ実行時から過去24時間以内のレコード数を計算します。このスケジュールクエリを継続的に実行することで、毎日データセット全体を処理することを回避できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HIVE:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT\n  CAST(\n    TD_TIME_FORMAT(time,\n      \"yyyy-MM-dd 00:00:00\") AS TIMESTAMP\n  ) AS `Datetime`,\n  method AS `Method`,\n  COUNT(1) AS `Count`\nFROM\n  www_access\nWHERE\n  TD_TIME_RANGE(time,\n    TD_TIME_ADD(TD_SCHEDULED_TIME(),\n      '-1d'),\n    TD_SCHEDULED_TIME())\nGROUP BY\n  TD_TIME_FORMAT(time,\n    \"yyyy-MM-dd 00:00:00\"),\n  method\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PRESTO:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PRESToクエリでは、便宜上TD_TIME_STRINGの代わりにTD_TIME_FORMATを使用してください。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT\n  CAST(\n    TD_TIME_FORMAT(time,\n      'yyyy-MM-dd 00:00:00') AS TIMESTAMP\n  ) AS \"dates\",\n  method AS `Method`,\n  COUNT(1) AS `Count`\nFROM\n  www_access\nGROUP BY\n  TD_TIME_FORMAT(time,\n    'yyyy-MM-dd 00:00:00'),\n  method\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"オプション","__idx":6},"children":["オプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tableau Serverへの結果出力は、様々なオプションをサポートしています。オプションは、CLIまたはREST API、サポートされている場合はConsoleでURLパラメータとして指定できます。オプションは通常、互いに互換性があり、組み合わせることができます。該当する場合、デフォルトの動作が示されています。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sslオプション","__idx":7},"children":["sslオプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ssl"]},"オプションは、Tableauサーバーへの接続にSSLを使用するかどうかを決定します。'true'の場合、SSLが使用されます。このオプションが指定されていない場合、デフォルトは",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ssl=true"]},"です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"tableau://username:password@my.tableauserver.com/?ssl=true\ntableau://username:password@my.tableauserver.com:443/?ssl=true\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ssl_verifyオプション","__idx":8},"children":["ssl_verifyオプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ssl_verify"]},"オプションは、SSL通信の証明書検証を要求するかどうかを決定します。'true'の場合、証明書検証が必要です。このオプションが指定されていない場合、デフォルトは",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ssl_verify=true"]},"です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"tableau://username:password@my.tableauserver.com/?ssl=true&ssl_verify=true\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["証明書検証の無効化は、TableauサーバーのSSL証明書が",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["自己署名"]},"の場合に特に有用です。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"timezone","__idx":9},"children":["Timezone"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["timestamp値はタイムゾーンに依存しません。例えば、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1548979200"]},"などです。Tableau DateTimeには日、時、分などが含まれます。timestamp値からTableau DateTimeに変換するには、コネクタはターゲットタイムゾーンを知る必要があります。クエリに",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TIMESTAMP"]},"カラムが含まれている場合、またはDateTimeカラムを",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TIMESTAMP"]},"にキャストする場合、値はDateTimeとしてTableauサーバーにエクスポートされます。つまり、変換が行われるため、ターゲットタイムゾーンを指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure DataはDateTime値をUTCタイムゾーンを使用して保存します。ほとんどの場合、特に値を別のタイムゾーンに変換したい場合を除き、Treasure Dataからの値を保持するために",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timezone"]},"をデフォルト(UTC)として設定したままにしてください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトのUTC以外のタイムゾーンを設定する例:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLIから:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td query \"...\" -r '{ \"type\": \"tableau\", ..., \"timezone\": \"America/Los_Angeles\" }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure ワークフローの一部として:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"host: \"tableau.company.com\"\nssl: true\nssl_verify: false\nusername: \"my_user\"\npassword: \"passw0rd\"\ndatasource: \"my_ds\"\nsite: \"MarketingTeam\"\nproject: \"Default\"\nserver_version: \"2018.1\"\ntimezone: \"America/Los_Angeles\"\n","lang":"yaml"},"children":[]}]},"headings":[{"value":"Tableau Server Export Integration CLI","id":"tableau-server-export-integration-cli","depth":1},{"value":"ワンタイムクエリのCLI使用方法","id":"ワンタイムクエリのcli使用方法","depth":2},{"value":"JSON形式の設定","id":"json形式の設定","depth":3},{"value":"URL形式の設定","id":"url形式の設定","depth":3},{"value":"ワンタイムクエリのTreasure コンソール使用方法","id":"ワンタイムクエリのtreasure-コンソール使用方法","depth":2},{"value":"Treasure コンソールを使用したクエリ更新のスケジュール設定","id":"treasure-コンソールを使用したクエリ更新のスケジュール設定","depth":2},{"value":"オプション","id":"オプション","depth":2},{"value":"sslオプション","id":"sslオプション","depth":3},{"value":"ssl_verifyオプション","id":"ssl_verifyオプション","depth":3},{"value":"Timezone","id":"timezone","depth":3}],"frontmatter":{"seo":{"title":"Tableau Server Export Integration CLI","description":"Tableau Serverへのデータエクスポート用CLI。ユーザー名/パスワードおよびPAT認証を使用して、クエリ結果を簡単にTableau Serverにエクスポートする方法を説明します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/tableau-server-export-integration-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}