{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Databricks Export Integration","description":"Databricksへのデータエクスポート方法を解説。Treasure AIからクエリ結果を簡単に連携し、データ分析を効率化する手順と注意点を説明します。","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":"databricks-export-integration","__idx":0},"children":["Databricks Export Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ジョブ結果を直接Databricksに書き込むことができます。例えば、複数のソースからTreasure Dataにデータを統合し、クエリを実行してデータを整理した後、コネクタを適用するジョブを使用してDatabricksにデータをエクスポートすることができます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポート連携については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/databricks-import-integration"},"children":["Databricksインポート連携"]},"を参照してください。"]},{"$$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":["TD Toolbelt"]},"を含むTreasure Dataの基本知識"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Databricksの基本知識とDatabricksアカウントへのアクセス"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Databricksサーバーへのアクセス"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"要件と制限事項","__idx":2},"children":["要件と制限事項"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Databricksサーバーが休止モードの場合、起動に数分かかる可能性があり、コネクタがタイムアウトする原因となることがあります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Databricksは複数のステートメントにまたがるトランザクションをサポートしていません。そのため、replaceモードとtruncateモードは部分的に失敗する可能性があり、ロールバックできません。例えば、truncateまたはreplaceモードで、削除またはcreate replace操作は成功したが、一時テーブルからターゲットテーブルへのデータ挿入が失敗した場合、コネクタは以前のデータにロールバックできません。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールを使用した接続の作成","__idx":3},"children":["Treasure コンソールを使用した接続の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソールを使用して接続を設定できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"databricksコネクタのホスト名とhttpパスの取得","__idx":4},"children":["Databricksコネクタのホスト名とHTTPパスの取得"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Databricksのウェブサイトにログインします。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SQLタブに移動し、SQL Warehousesを選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/databricks-export-integration-2024-02-21-3.90cecd1408ee55f95aa56d2175e3afd6ce827e8634cab70f3c8cdd4a97d42f88.a33e2d6c.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SQL Warehouseのインスタンスを選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/databricks-export-integration-2024-02-21-9.1224b9f2be7bed1529fd3e0a6f88f7af06a3f1fd03402079fb5d667c03fb4f49.a33e2d6c.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Connection detailsタブを選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SQL WarehouseのServer hostnameとHTTP pathを記録します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/databricks-export-integration-2024-02-21-10.a2aee3545eae631d1fb5258bb94502ca35163d216c0c65374ddce0c591a8fec8.a33e2d6c.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/app/connections/data-sources"},"children":["Treasure Data Connections"]},"に移動します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Catalog"]},"を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["カタログでDatabricksを検索します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["アイコンにマウスを合わせて、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Authentication"]},"を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Credentialsタブが選択されていることを確認し、連携の認証情報を入力します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/databricks-export-integration-2024-02-21-1.04e2663633e3ecf2111d90be1e4cdc0fce8e995a98ad680af4cabb8aa03e7c28.a33e2d6c.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":"Parameter"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameter"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hostname"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricksインスタンスのホスト名です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTTP Path"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricksインスタンスの HTTPパスです。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authentication Method"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["以下のいずれかを選択してください：",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"s","attributes":{},"children":["Basic (End of Life)"]},"。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.databricks.com/aws/en/security/auth/password-deprecation"},"children":["Databricks管理パスワードの廃止について"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Personal Access Token（非推奨）。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.databricks.com/aws/en/dev-tools/auth/pat"},"children":["Databricksパーソナルアクセストークン（レガシー）による認証"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["OAuth M2M"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Username"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ログインに使用するユーザー名です。Authentication MethodがBasicの場合にのみ有効です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Password"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ログインに使用するパスワードです。Authentication MethodがBasicの場合にのみ有効です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Token"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricksのpersonal access tokenです。Authentication MethodがPersonal Access Tokenの場合にのみ有効です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Client ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["サービスプリンシパルのUUIDまたはApplication IDです。認証方法がOAuth M2Mの場合にのみ利用可能です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Client Secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["サービスプリンシパルのOAuthシークレットです。認証方法がOAuth M2Mの場合にのみ利用可能です。"]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["認証の名前を入力し、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"パラメータを指定して接続を設定する","__idx":6},"children":["パラメータを指定して接続を設定する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データ接続を設定するクエリを作成または再利用します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.treasuredata.com/users/sign_in"},"children":["Treasure コンソール"]},"に移動します。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.treasuredata.com/app/queries/editor"},"children":["Query Editor"]},"に移動します。データのエクスポートに使用する予定のクエリにアクセスします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["場合によっては、クエリで列マッピングを定義する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"SELECT c_id, c_double, c_long, c_string, c_boolean, c_timestamp, c_json FROM (VALUES (1, 100, 10, 'T4', true, '2018-01-01','{ \"name\":\"John\"}'),(2, 100, 99, 'P@#4', false, '2018-01-01', '{ \"name\":\"John\"}'),(3, 100.1234, 22, 'C!%^&*', false, '2018-01-01','{ \"name\":\"John\"}')) tbl1 (c_id, c_double, c_long, c_string, c_boolean, c_timestamp, c_json)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クエリエディタの上部にあるOutput Resultsを選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"パラメータを指定して接続を設定する-1","__idx":7},"children":["パラメータを指定して接続を設定する"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["検索ボックスに接続名を入力してフィルタリングし、接続を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Databricks接続を選択すると、ConfigurationまたはExport Resultsダイアログペインが表示されます。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/databricks-export-integration-2024-02-21-2.258c59c45384d358126b1d3a14c47dac59e22c56e54dcc11d96aa78067829cc4.a33e2d6c.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":["Catalog (必須): データセットカタログです。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Schema (必須): データセットスキーマです。"]}]},{"$$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":["Mode (必須): Databricksテーブルに結果を反映する3つのモードがあります: Append、Overwrite、Replace。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Append: TD結果がターゲットテーブルに追加されます"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Overwrite: ターゲットテーブルが消去され、TD結果がターゲットテーブルの先頭から追加されます"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Replace: ターゲットテーブルが再作成され、TD結果がターゲットテーブルの先頭から追加されます"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data type mapping: 次のセクションで説明します。"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"データ型マッピング","__idx":8},"children":["データ型マッピング"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ターゲットテーブルが存在しない場合の、TD結果の型からターゲットテーブルへの1対1のデフォルトマッピングのテーブルは次の通りです:"]},{"$$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":"TD results"},"children":["TD results"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Databricks"},"children":["Databricks"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["double"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DOUBLE"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["long"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BIGINT"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["timestamp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIMESTAMP"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BOOLEAN"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトとは異なる型を設定したい場合があります。Data Type Mappingを使用すると、特定の列に特定の型(例: STRING)を明示的に設定できます。Data Type Mappingは、ターゲットテーブルの列にのみ型を適用します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Mappingを使用する場合、以下が当てはまります:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ターゲットテーブルが存在しない場合、エクスポートジョブは新しいターゲットテーブルを作成します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データ型マッピングパラメータの構文は、col_name_1: STRING; col_name2: BIGINTです。列名とDatabricksデータ型を指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TD Databricks ExportはBINARY、INTERVAL、STRUCTURE、ARRAY、MAPデータ型をサポートしていません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例えば、クエリの場合:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"SELECT c_id, c_double, c_long, c_string, c_boolean, c_timestamp, c_json FROM (VALUES (1, 100, 10, 'T4', true, '2018-01-01','{ \"name\":\"John\"}'),(2, 100, 99, 'P@#4', false, '2018-01-01', '{ \"name\":\"John\"}'),(3, 100.1234, 22, 'C!%^&*', false, '2018-01-01','{ \"name\":\"John\"}')) tbl1 (c_id, c_double, c_long, c_string, c_boolean, c_timestamp, c_json)\nオプション: 出力のためのスケジュールジョブの使用\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/job-management/scheduling-jobs-using-td-console"},"children":["Scheduled Jobs"]},"とResult Outputを使用して、特定のターゲット先に出力結果を定期的に書き込むことができます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"audience-studio-で-segment-をアクティベートする","__idx":9},"children":["Audience Studio で Segment をアクティベートする"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Audience Studio で activation を作成することで、segment データをターゲットプラットフォームに送信することもできます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Audience Studio"]}," に移動します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["parent segment を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ターゲット segment を開き、右クリックして、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Activation"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]}," パネルで、Activation 名を入力し、前述の Configuration Parameters のセクションに従って activation を設定します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Output Mapping"]}," パネルで activation 出力をカスタマイズします。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ouput.b2c7f1d909c4f98ed10f5300df858a4b19f71a3b0834df952f5fb24018a5ea78.8ebdf569.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Attribute Columns",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export All Columns"]}," を選択すると、変更を加えずにすべての列をエクスポートできます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add Columns"]}," を選択して、エクスポート用の特定の列を追加します。Output Column Name には、Source 列名と同じ名前があらかじめ入力されます。Output Column Name を更新できます。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add Columns"]}," を選択し続けて、activation 出力用の新しい列を追加します。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["String Builder",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add string"]}," を選択して、エクスポート用の文字列を作成します。次の値から選択します:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["String: 任意の値を選択します。テキストを使用してカスタム値を作成します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Timestamp: エクスポートの日時。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Id: segment ID 番号。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Name: segment 名。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Audience Id: parent segment 番号。"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":6},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," を設定します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/snippet-output-connector-on-audience-studio-2024-08-28.a99525173709da1eb537f839019fa7876ffae95045154c8f2941b030022f792c.8ebdf569.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["スケジュールを定義する値を選択し、オプションでメール通知を含めます。"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":7},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["batch journey の activation を作成する必要がある場合は、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/journey-orchestration/batch/creating-a-batch-journey-activation"},"children":["Creating a Batch Journey Activation"]}," を参照してください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"オプション-workflowでのエクスポート結果の設定","__idx":10},"children":["オプション: Workflowでのエクスポート結果の設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure ワークフロー内で、このデータコネクタを使用してデータを出力するように指定できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"timezone: UTC\n  _export:\n    td:\n      database: sample_datasets\n\n+td-result-into-databricks:\n  td>: queries/sample.sql\n  result_connection: your_connection_name\n  result_settings:\n    catalog: CATALOG\n    schema: default\n    table: TARGET_TABLE\n    mode: insert\n    column_options:\n      col1: {type: 'DATE'}\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cliを使用した接続の作成","__idx":11},"children":["CLIを使用した接続の作成"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tdコマンドのインストール","__idx":12},"children":["'td'コマンドのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["TD Toolbelt"]},"をインストールします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"オンデマンドジョブの場合","__idx":13},"children":["オンデマンドジョブの場合"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td query"]},"コマンドの",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-r"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--result"]},"オプションを使用してDatabricks結果出力先を追加します:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query -d mydb \\\n-w 'SELECT id, name FROM source_table' \\\n--type presto \\\n-r '{\"type\": \"databricks\", \"host_name\": \"hostname\", \"http_path\": \"httpPath\", \"auth_method\": \"BASIC\", \"username\": \"username\", \"password\": \"password\", catalog: \"catalog\", \"schema\": \"default\", \"table\": \"target_table\", \"mode\": \"replace\", \"column_options\": {\"col1\": {\"type\": \"DATE\"}}}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["catalogやschemaなどの一部のパラメータは自明であり、Treasure コンソールで使用されるパラメータと同じです(「パラメータを指定して接続を設定する」セクションを参照)。ただし、一部のパラメータはキーまたは値が異なります:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["mode (必須): modeの値はModeパラメータの生の値です:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["insert: TD結果がターゲットテーブルに追加されます"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["truncate_insert: ターゲットテーブルが消去され、TD結果がターゲットテーブルの先頭から追加されます"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["replace: ターゲットテーブルが再作成され、TD結果がターゲットテーブルの先頭から追加されます"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["column_options: データ型マッピングです。"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スケジュールジョブの場合","__idx":14},"children":["スケジュールジョブの場合"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td sched:create"]},"コマンドの",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-r"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--result"]},"オプションを使用してDatabricks結果出力先を追加します:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td sched:create every_6_mins \"*/6 * * * *\" \\\n-d mydb \\\n-w 'SELECT id, name FROM source_table' \\\n--type presto \\\n-r '{\"type\": \"databricks\", \"host_name\": \"hostname\", \"http_path\": \"httpPath\", \"auth_method\": \"BASIC\", \"username\": \"username\", \"password\": \"password\", catalog: \"catalog\", \"schema\": \"default\", \"table\": \"target_table\", \"mode\": \"replace\", \"column_options\": {\"col1\": {\"type\": \"DATE\"}}}'\n","lang":"bash"},"children":[]}]},"headings":[{"value":"Databricks Export Integration","id":"databricks-export-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"要件と制限事項","id":"要件と制限事項","depth":2},{"value":"Treasure コンソールを使用した接続の作成","id":"treasure-コンソールを使用した接続の作成","depth":2},{"value":"Databricksコネクタのホスト名とHTTPパスの取得","id":"databricksコネクタのホスト名とhttpパスの取得","depth":3},{"value":"新しい接続の作成","id":"新しい接続の作成","depth":3},{"value":"パラメータを指定して接続を設定する","id":"パラメータを指定して接続を設定する","depth":3},{"value":"パラメータを指定して接続を設定する","id":"パラメータを指定して接続を設定する-1","depth":3},{"value":"データ型マッピング","id":"データ型マッピング","depth":3},{"value":"Audience Studio で Segment をアクティベートする","id":"audience-studio-で-segment-をアクティベートする","depth":2},{"value":"オプション: Workflowでのエクスポート結果の設定","id":"オプション-workflowでのエクスポート結果の設定","depth":2},{"value":"CLIを使用した接続の作成","id":"cliを使用した接続の作成","depth":2},{"value":"'td'コマンドのインストール","id":"tdコマンドのインストール","depth":3},{"value":"オンデマンドジョブの場合","id":"オンデマンドジョブの場合","depth":3},{"value":"スケジュールジョブの場合","id":"スケジュールジョブの場合","depth":3}],"frontmatter":{"seo":{"title":"Databricks Export Integration","description":"Databricksへのデータエクスポート方法を解説。Treasure AIからクエリ結果を簡単に連携し、データ分析を効率化する手順と注意点を説明します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/databricks-export-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}