{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Legacy Bulk Import From Mongodb","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","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":"legacy-bulk-import-from-mongodb","__idx":0},"children":["Legacy Bulk Import From Mongodb"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This article explains how to dump data from MongoDB and import it into Treasure Data."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"install-legacy-bulk-import","__idx":1},"children":["Install Legacy Bulk Import"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First, install the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://support.treasuredata.com/hc/en-us/articles/command-line"},"children":["Toolbelt"]},", which includes bulk loader program, on your computer."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"downloads","__idx":2},"children":["Downloads"]},{"$$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":["After the installation, the td command will be installed on your computer. Open up the terminal, and type td to execute the command. Also, make sure you have java as well. Execute td import:jar_update to download the up-to-date version of our bulk loader:"]},{"$$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":2,"id":"dump","__idx":3},"children":["Dump"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the mongoexport command to export a collection into JSON (default) or CSV format as shown below:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ mongoexport --db users --collection contacts --out /tmp/result.json\n$ mongoexport --db users --collection contacts --csv --out /tmp/result.csv\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, consult the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://docs.mongodb.org/manual/reference/mongoexport/"},"children":["MongoDB documentation"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"bulk-import-from-csv-file-or-json-file","__idx":4},"children":["Bulk Import from CSV file or JSON file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/batch/import/bulk-data-import"},"children":["Bulk Import from CSV files"]}," about how to import CSV files or ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/legacy-bulk-import-from-json-file"},"children":["Bulk Import from JSON files"]}," about how to import JSON files."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For further details, check the following pages:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/legacy-bulk-import-internals"},"children":["Bulk Import Internals"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/legacy-bulk-import-tips-and-tricks"},"children":["Bulk Import Tips and Tricks"]}]}]}]},"headings":[{"value":"Legacy Bulk Import From Mongodb","id":"legacy-bulk-import-from-mongodb","depth":1},{"value":"Install Legacy Bulk Import","id":"install-legacy-bulk-import","depth":1},{"value":"Downloads","id":"downloads","depth":2},{"value":"Dump","id":"dump","depth":2},{"value":"Bulk Import from CSV file or JSON file","id":"bulk-import-from-csv-file-or-json-file","depth":2}],"frontmatter":{"seo":{"title":"Legacy Bulk Import From Mongodb"}},"lastModified":"2026-03-10T06:17:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/legacy-bulk-import-from-mongodb","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}