{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"AWS S3向けレガシーバルクインポート","description":"AWS S3からTreasure AIへのデータインポート方法を解説。サポートされるファイル形式（CSV、JSON、TSV）と、バルクローダーを使用したインポート手順を詳しく説明します。","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":"aws-s3向けレガシーバルクインポート","__idx":0},"children":["AWS S3向けレガシーバルクインポート"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この記事では、Amazon S3からTreasure Dataにデータを直接インポートする方法について説明します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"バルクインポートのインストール","__idx":1},"children":["バルクインポートのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["まず、バルクローダープログラムを含む",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://support.treasuredata.com/hc/en-us/articles/command-line"},"children":["Toolbelt"]},"をお使いのコンピューターにインストールします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ダウンロード","__idx":2},"children":["ダウンロード"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/win"},"children":["Toolbelt Installer for Windows"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/mac"},"children":["Toolbelt Installer for Mac OS X"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/quickstart"},"children":["Toolbelt Installer for Linux"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インストール後、お使いのコンピューターに",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td"]},"コマンドがインストールされます。ターミナルを開いて",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td"]},"と入力してコマンドを実行してください。また、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["java"]},"もインストールされていることを確認してください。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td import:jar_update"]},"を実行して、最新バージョンのバルクローダーをダウンロードします:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td\nusage: td [options] COMMAND [args]\n$ java\nUsage: java [-options] class [args...]\n$ td import:jar_update\nInstalled td-import.jar 0.x.xx into /path/to/.td/java\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"認証","__idx":3},"children":["認証"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure アカウントにログインします。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td account -f\nEnter your Treasure Data credentials.\nEmail: xxxxx\nPassword (typing will be hidden):\nAuthenticated successfully.\nUse 'td db:create db_name' to create a database.\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"amazon-s3からのデータインポート","__idx":4},"children":["Amazon S3からのデータインポート"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["バルクローダーは、Amazon S3に保存されたファイルから、サポートされている3つのファイル形式でデータを読み取ることができます:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["CSV(デフォルト)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["JSON"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TSV"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Amazon S3に次の内容の",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.csv"]},"というファイルがあるとします:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"\"host\",\"log_name\",\"date_time\",\"method\",\"url\",\"res_code\",\"bytes\",\"referer\",\"user_agent\"\n\"64.242.88.10\",\"-\",\"2004-03-07 16:05:49\",\"GET\",\"/twiki/bin/edit/Main/Double_bounce_sender?topicparent=Main.ConfigurationVariables\",401,12846,\"\",\"\"\n\"64.242.88.10\",\"-\",\"2004-03-07 16:06:51\",\"GET\",\"/twiki/bin/rdiff/TWiki/NewUserTemplate?rev1=1.3&rev2=1.2\",200,4523,\"\",\"\"\n\"64.242.88.10\",\"-\",\"2004-03-07 16:10:02\",\"GET\",\"/mailman/listinfo/hsdivision\",200,6291,\"\",\"\"\n\"64.242.88.10\",\"-\",\"2004-03-07 16:11:58\",\"GET\",\"/twiki/bin/view/TWiki/WikiSyntax\",200,7352,\"\",\"\"\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次のコマンドを実行してCSVファイルをアップロードします:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td db:create my_db\n$ td table:create my_db my_tbl\n$ td import:auto \\\n  --format csv --column-header \\\n  --time-column date_time \\\n  --time-format \"%Y-%m-%d %H:%M:%S\" \\\n  --auto-create my_db.my_tbl \\\n  \"s3://s3_access_key:s3_secret_key@/my_bucket/path/to/data.csv\"\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ファイルの場所は、AWSのパブリックおよびプライベートアクセスキーが埋め込まれたS3パスとして表現されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td import:auto"]},"は無効な行をチェックするためにMapReduceジョブを実行するため、少なくとも",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["1〜2分"]},"かかります。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-column"]},"に選択したカラムがエポックタイムスタンプ(またはUnix時間)の場合、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-format"]},"フラグは不要です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上記のコマンドでは、次のことを想定しています:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["CSVファイルはAmazon S3上の",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["my_bucket"]},"というバケット内の",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/path/to/"]},"というパス/キー配下に配置されています。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ファイルの最初の行にはカラム名が記載されているため、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--column-header"]},"オプションを指定しています。ファイルの最初の行にカラム名がない場合は、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--columns"]},"オプションでカラム名を指定する必要があります(オプションで",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--column-types"]},"オプションでカラム型を指定できます)。または、ファイル内の各カラムに対して",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--column-types"]},"を使用します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["時刻フィールドは\"date_time\"と呼ばれ、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-column"]},"オプションで指定されています"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["時刻形式は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["%Y-%m-%d %H:%M:%S"]},"であり、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-format"]},"オプションで指定されています"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ワイルドカード","__idx":5},"children":["ワイルドカード"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["バルクローダーでインポートするソースファイルは、完全なAmazon S3パスまたはワイルドカードを使用して指定できます。以下にいくつかの例を示します:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["s3://my_bucket/path/to/data*"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["my_bucket/path/to/"]},"配下にある、プレフィックスが",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]},"のすべてのファイル"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["s3://my_bucket/path/to/data*.csv"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["my_bucket/path/to/"]},"配下にある、プレフィックスが",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]},"で拡張子が",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".csv"]},"のすべてのファイル"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["s3://my_bucket/path/to/*.csv"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["my_bucket/path/to/"]},"配下にある、拡張子が",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".csv"]},"のすべてのファイル"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["s3://my_bucket/path/to/*"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["my_bucket/path/to/"]},"配下のすべてのファイル"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["s3://my_bucket/path/to/*/*.csv"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["my_bucket/path/"]},"の直接のサブフォルダ内にある、拡張子が",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".csv"]},"のすべてのファイル"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["s3://my_bucket/**/*.csv"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["my_bucket/path/"]},"のすべてのサブフォルダ内にある、拡張子が",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".csv"]},"のすべてのファイル"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["詳細については、以下のページを参照してください:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/legacy-bulk-import-internals"},"children":["Bulk Import Internals"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/legacy-bulk-import-tips-and-tricks"},"children":["Bulk Import Tips and Tricks"]}]}]}]},"headings":[{"value":"AWS S3向けレガシーバルクインポート","id":"aws-s3向けレガシーバルクインポート","depth":1},{"value":"バルクインポートのインストール","id":"バルクインポートのインストール","depth":1},{"value":"ダウンロード","id":"ダウンロード","depth":2},{"value":"認証","id":"認証","depth":1},{"value":"Amazon S3からのデータインポート","id":"amazon-s3からのデータインポート","depth":1},{"value":"ワイルドカード","id":"ワイルドカード","depth":3}],"frontmatter":{"seo":{"title":"AWS S3向けレガシーバルクインポート","description":"AWS S3からTreasure AIへのデータインポート方法を解説。サポートされるファイル形式（CSV、JSON、TSV）と、バルクローダーを使用したインポート手順を詳しく説明します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/legacy-bulk-import-for-aws-s3","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}