A folder full of one-table files

FileToMongo » Use cases » One collection per file

Download FileToMongo Free Trial »     Buy FileToMongo Now »

The situation

An export produced one file per table - customers.csv, products.xlsx, orders.json, plus a few dozen more - and each one is a different collection. The shape of the job is obvious and repetitive: open the file, name the collection the same as the file, map the fields, import, next.

Fifty files is fifty repetitions of the same four decisions, and one of them will be got wrong.

What you do

  1. Open Folder to Collections and point it at the folder. The files are listed.
  2. Let the destination be derived from the file names, or set each destination collection yourself on the mapping screen - every file is one line, all visible at once.
  3. Configure the fields once where the files share a shape; the settings carry across the list.
  4. Run. Every file in the folder is imported in that single pass, into its own collection.

Mapping each file in a folder to its own MongoDB collection in FileToMongo

A new export can be dropped into the folder and the same saved session run again - which makes this a one-click load for a recurring handover, or a command for a scheduler.

What it will not do

Related

Every file into one collection instead: many files into one collection. A single file: load a spreadsheet, file to collection. The batch mode itself: folder to collections. Repeating it: sessions, command line.