{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"MySQL Tables Export Integration","description":"Treasure AIから既存のMySQLインスタンスにクエリ結果を簡単にエクスポートする方法を解説。接続設定、権限、エクスポート手順を詳しく説明します。","siteUrl":"https://docs.treasure.ai","image":"/assets/treasure-ai-social-preview.e6fefb35676f6da91c2d1bc783bd39e618e7af2b1ad3aa52a96ae69d72e700fe.b1bff462.png","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":"mysql-tables-export-integration","__idx":0},"children":["MySQL Tables Export Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この記事では、既存のMySQLインスタンスにジョブ結果を書き込む方法について説明します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["サンプルワークフローについては、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/treasure-boxes/tree/master/td/mysql"},"children":["Treasure Boxes"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TD Toolbeltを含むTreasure AIの基本的な知識"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MySQL"]},"インスタンス"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure AIはSELECT、INSERT、DELETE、CREATE、DROP、およびALTER権限を持っている必要があります"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["replaceモードを使用すると、MySQLテーブルのスキーマが変更される場合があります。ターゲットテーブルへのスキーマ変更を避けるには、「スキーマを保持する」オプションを選択してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"mysqlインスタンスへの結果エクスポートの設定","__idx":2},"children":["MySQLインスタンスへの結果エクスポートの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure AIからのエクスポートはクエリを使用します。クエリを作成するか、既存のクエリを再利用します。クエリ内で、データ接続を設定します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しいクエリを使用する","__idx":3},"children":["新しいクエリを使用する"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure コンソールを開きます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Data Workbench > Queriesに移動します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["右上隅の",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Query"]},"を選択して、新しいクエリを作成します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191020-192019.0232885374130325d22392d0b4bfe64f91a33c43b49bdf70ce83060d1f45299b.db94e26c.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"既存のクエリを使用する","__idx":4},"children":["既存のクエリを使用する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データのエクスポートに使用する予定のクエリを選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191020-192033.1a80cf9f6102a7cf739abfa2a0c95a0dea12ab476055e8d4083d2edcf242266b.db94e26c.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"クエリ結果のエクスポート設定","__idx":5},"children":["クエリ結果のエクスポート設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クエリの設定が完了したら、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export Results"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191020-192103.7e7c03acaa386e8b65a85daec52df752433beac913b2a2f7422753de3a8e49e4.db94e26c.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Choose Integrationダイアログが開きます。結果をエクスポートするために使用する接続を選択する際、2つのオプションがあります：既存の接続を使用するか、新しいMySQL接続を作成するかです。"]},{"$$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":"img","attributes":{"src":"/assets/image-20191020-192117.37506e5691df7c6b8aa5458de241fbd2d745f52a8ef70e1304f2b27d5ec86af2.db94e26c.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しいmysql接続を作成する","__idx":7},"children":["新しいMySQL接続を作成する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["フィールド値を入力して、新しい接続を作成します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/img-20261020-authentication.72dfa896e6387629abc6687e7b77500b25a50e528f9c5555925f7cc0ca1ae7eb.db94e26c.webp","alt":"接続名、認証情報、Connector/Jドライバーバージョン、SSL設定、およびJDBC接続オプションを表示する新しいMySQL接続フォーム"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["新しいMySQL接続に必要な認証情報を入力します。以下のパラメータを設定します："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Host"]},": IPアドレスなど、ソースデータベースのホスト情報"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User"]},": ソースデータベースに接続するためのユーザー名"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Password"]},": ソースデータベースに接続するためのパスワード"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Driver version"]},": 既存の動作にはConnector/J 5.1を、最新のMySQL 8接続フローにはConnector/J 8.0を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SSL mode (Connector/J 5.1)"]},": 次のレガシーTLSオプションから選択します。",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Disable"]},": TLSを使用しません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Enable"]},": サーバー証明書を検証せずにTLSを使用します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Verify certs (enable)"]},": TLSを使用し、サーバーが有効な証明書を提示することを必須にします。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SSL mode (Connector/J 8.0)"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Required"]},"でTLSを強制します。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Verify CA"]},"および",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Verify identity"]},"には**Trusted CA certificate (PEM)**が必要です。本番接続では、可能な場合は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Verify identity"]},"を使用してください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"サポートされるconnectorjバージョンと認証","__idx":8},"children":["サポートされるConnector/Jバージョンと認証"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Driver version"]},"フィールドは、エクスポート接続に使用するMySQL Connector/Jドライバーを制御します。MySQLは一致したサーバーアカウントの認証プラグインを選択するため、Treasure AIで認証方式を選択する必要はありません。"]},{"$$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":"Driver version"},"children":["Driver version"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"MySQLおよび認証のサポート"},"children":["MySQLおよび認証のサポート"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connector/J 5.1.x"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["既存の互換性があるMySQLアカウント向けの、デフォルトのレガシー動作です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connector/J 8.0.x"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MySQL 8向けの最新の接続フローです。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["caching_sha2_password"]},"および互換性がある",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mysql_native_password"]},"アカウントをサポートします。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["caching_sha2_password"]},"アカウントにはこのバージョンを選択してください。"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mysql_native_password"]},"はレガシーであり、新しいMySQLサーバーバージョンでは無効化または削除される場合があります。新しいMySQL 8アカウントには、Connector/J 8.0と",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["caching_sha2_password"]},"を使用してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"転送設定の構成","__idx":9},"children":["転送設定の構成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接続を設定した後、転送パラメータを設定します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/mysql-tables-export-integration-2024-07-18.b3200bd9989c35ccb7adfebbc1b02a3b5aa03582bfda7549ed3a88c55d55eb68.db94e26c.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/mysql-tables-export-integration-2024-03-26-1.8720778daefb1d45c4bb95b34334bef5b148523455cfa4e53a85147585d4a809.db94e26c.png","alt":""},"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":["Database name"]},": データを転送するデータベースの名前（例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["your_database_name"]},"）"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table"]},": データをエクスポートするテーブル"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table Charset"]},": ターゲットテーブルがサーバーのデフォルト文字セットと異なる文字セットを持つ場合に入力する必要があります。例：utf8mb4"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table Collation"]},": ターゲットテーブルがサーバーのデフォルト照合順序と異なる照合順序を持つ場合に入力する必要があります。例：utf8mb4_0900_ai_ci、utf8mb4_general_ci"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Output mode"]},": データをアップロードするための異なる方法"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Append"]},"（URLでmodeオプションが指定されていない場合に使用されるデフォルト）クエリ結果はテーブルに追加されます。テーブルが存在しない場合は、テーブルが作成されます。このモードはアトミックです。SQL文を使用します",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INSERT INTO target_table SELECT * FROM * temp_table;"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replace"]},": 既存のテーブルの全体の内容を、結果のクエリ出力で置き換えます。テーブルがまだ存在しない場合は、新しいテーブルが作成されます。replaceモードは、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["単一のトランザクション"]},"で以下の3つのステップを実行することにより、アトミック性（テーブルの消費者が常に一貫したデータを持つようにする）を実現します：",{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一時テーブルを作成します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一時テーブルに書き込みます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ALTER TABLE RENAMEを使用して既存のテーブルを一時テーブルに置き換えます。"," ","replaceモードを使用すると、MySQLテーブルのスキーマが変更される場合があります。ターゲットテーブルへのスキーマ変更を避けるには、「スキーマを保持する」オプションを選択してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SQL文を使用します",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["target_tableが存在しない場合：RENAME temp_table --> target_table"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["target_tableが存在する場合：RENAME temp_table --> swap_table, target_table --> temp_table, swap_table --> target_table"]}]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Truncate:"]}," システムはまず既存のテーブルをトランケートし、Appendモードのようにクエリ結果を挿入します。テーブルがまだ存在しない場合は、新しいテーブルが作成されます。このモードはアトミックです。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Update:"]}," 「unique」パラメータで指定された列に重複した値を引き起こさない限り、行が挿入されます：その場合は、代わりに更新が実行されます。「unique」パラメータは、updateモードを使用する場合にのみ適用されます。このモードはアトミックです。SQL文",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["uniqueパラメータなしまたはnull：REPLACE INTO target_table SELECT * FROM * temp_table;"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["uniqueパラメータあり：upsertを実行",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["UPDATE target_table, temp_table SET target_table.* = temp_table.* WHERE target_table.unique_keys = temp_table.unique_keys"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["INSERT INTO target_table SELECT * FROM temp_table WHERE NOT EXISTS (SELECT 1 FROM target_table TD WHERE target_table.unique_keys = temp_table.unique_keys)"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use compression"]},": サーバーへの接続では、接続を介して送信されるバイト数を減らすために、クライアントとサーバー間のトラフィックに圧縮を使用できます。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use UTF-8 Encoding"]},": UTF-8形式のMySQL server configとの後方互換性。"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"クエリの実行と結果の確認","__idx":10},"children":["クエリの実行と結果の確認"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["「Output Results」チェックボックスをチェックした状態でクエリを実行します。クエリが正常に完了すると、転送の詳細を入力したときに指定したMySQLデータベースとテーブルに結果が表示されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"audience-studioでセグメントをアクティベートする","__idx":11},"children":["Audience Studioでセグメントをアクティベートする"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Audience Studioでアクティベーションを作成することにより、ターゲットプラットフォームにセグメントデータを送信することもできます。"]},{"$$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":["親セグメントを選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ターゲットセグメントを開き、右クリックして、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Activation"]},"を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]},"パネルで、アクティベーション名を入力し、Configuration Parametersに関する前のセクションに従ってアクティベーションを設定します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Output Mapping"]},"パネルでアクティベーション出力をカスタマイズします。"]}]},{"$$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"]},"を引き続き選択します。"]}]}]},{"$$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: セグメントID番号"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Name: セグメント名"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Audience Id: 親セグメント番号"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"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":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"出力のためのスケジュールされたジョブのオプション使用","__idx":12},"children":["出力のためのスケジュールされたジョブのオプション使用"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Result Outputを使用したスケジュールされたジョブは、指定されたMySQLインスタンスに出力結果を定期的に書き込みます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ワークフローでのエクスポート結果設定のオプション構成","__idx":13},"children":["ワークフローでのエクスポート結果設定のオプション構成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure ワークフロー内で、このデータコネクタを使用してデータを出力することを指定できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"timezone: UTC\n\n_export:\n  td:\n    database: sample_datasets\n\n+td-result-output-mysql:\n  td>: queries/sample.sql\n  result_connection: your_connections_name\n  result_settings:\n   database: database_name\n   table: table_name\n   mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"付録","__idx":14},"children":["付録"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"mysqlサーバーを57から8にアップグレードする際のデフォルト照合順序","__idx":15},"children":["MySQLサーバーを5.7から8にアップグレードする際のデフォルト照合順序"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MySQL 5.7では、デフォルトの照合順序は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["utf8mb4_general_ci"]},"でした。しかし、MySQL 8では、デフォルトの文字セットは",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["utf8mb4"]},"であり、デフォルトの照合順序は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["utf8mb4_0900_ai_ci"]},"です"," ","MySQL output connectorは、サーバーのデフォルト照合順序（一時テーブルの作成に使用される）がターゲットテーブルの照合順序と異なる場合、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["update"]},"モード（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unique"]},"設定を使用）で動作しない可能性があります（illegal mix of collationsエラー）"," ","その場合、一時テーブルがターゲットテーブルと同じ文字セットと照合順序を持つことを確認するために、2つの設定（table_charsetとtable_collation）を使用する必要があります"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["（MySQLの「illegal mix of collations」エラーは、互換性のない照合順序を持つテキスト列を比較または結合しようとしたときに発生します（照合順序は文字セット内の文字を比較するためのルールのセットです）。"]}]},"headings":[{"value":"MySQL Tables Export Integration","id":"mysql-tables-export-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"MySQLインスタンスへの結果エクスポートの設定","id":"mysqlインスタンスへの結果エクスポートの設定","depth":2},{"value":"新しいクエリを使用する","id":"新しいクエリを使用する","depth":3},{"value":"既存のクエリを使用する","id":"既存のクエリを使用する","depth":3},{"value":"クエリ結果のエクスポート設定","id":"クエリ結果のエクスポート設定","depth":2},{"value":"既存の接続を使用する","id":"既存の接続を使用する","depth":3},{"value":"新しいMySQL接続を作成する","id":"新しいmysql接続を作成する","depth":3},{"value":"サポートされるConnector/Jバージョンと認証","id":"サポートされるconnectorjバージョンと認証","depth":2},{"value":"転送設定の構成","id":"転送設定の構成","depth":2},{"value":"クエリの実行と結果の確認","id":"クエリの実行と結果の確認","depth":2},{"value":"Audience Studioでセグメントをアクティベートする","id":"audience-studioでセグメントをアクティベートする","depth":2},{"value":"出力のためのスケジュールされたジョブのオプション使用","id":"出力のためのスケジュールされたジョブのオプション使用","depth":2},{"value":"ワークフローでのエクスポート結果設定のオプション構成","id":"ワークフローでのエクスポート結果設定のオプション構成","depth":2},{"value":"付録","id":"付録","depth":2},{"value":"MySQLサーバーを5.7から8にアップグレードする際のデフォルト照合順序","id":"mysqlサーバーを57から8にアップグレードする際のデフォルト照合順序","depth":4}],"frontmatter":{"seo":{"title":"MySQL Tables Export Integration","description":"Treasure AIから既存のMySQLインスタンスにクエリ結果を簡単にエクスポートする方法を解説。接続設定、権限、エクスポート手順を詳しく説明します。"}},"lastModified":"2026-10-20T15:38:18.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/mysql-tables-export-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}