Copy data from PostgreSQL table to MongoDB collection without programming

by

Want to copy data from PostgreSQL table to MongoDB collection?

Using DBToMongo, a native GUI tool, you can transfer data from PostgreSQL table to MongoDB collection easily and fast, just a few mouse clicks!

Support all MongoDB deployment types: standalone, replica set, sharded cluster, and MongoDB Atlas.

Support Windows, Linux, macOS.

Here’s how to.

Example

Example source PostgreSQL table data

Copy data from PostgreSQL table to MongoDB collection - source PostgreSQL table

After converting, data in MongoDB collection

Import data from PostgreSQL table to MongoDB collection - view MongoDB collection

Copy

Please download and install DBToMongo, then run it.

Login to PostgreSQL.

Copy data from PostgreSQL table to MongoDB collection - Login to PostgreSQL

Login to MongoDB.

Copy data from PostgreSQL table to MongoDB collection - Login to MongoDB

Click “Convert From Table” at task dialog.

Import data from PostgreSQL table to MongoDB collection - Task Window

then show the wizard.

1. Choose source PostgreSQL table.

Convert data from PostgreSQL table to MongoDB collection - open table

2. Choose destination MongoDB collection and config fields.

Extract PostgreSQL table data to MongoDB collection - select collection

3. Summary.

Load data from PostgreSQL table to MongoDB collection - summary

4. Copy PostgreSQL table data to MongoDB collection.

Transfer data from PostgreSQL table to MongoDB collection - Transfer

Click “View”, See MongoDB collection data.

Export data from PostgreSQL table to MongoDB collection - view collection

Save/load session

You can save/load session to run “PostgreSQL table to MongoDB collection” conversion repeatly.

1.Save Session.

Click “Save Session” button, then enter a session file name.

Import data from PostgreSQL table to MongoDB collection - save session

click “OK” button.

2.Load Session.

Click the “Open a Saved Session” in task window, select a session file.

Import data from PostgreSQL table to MongoDB collection - load session

then show the wizard form, click a few “Next” to import PostgreSQL table to MongoDB collection.

Import data from PostgreSQL table to MongoDB collection - start session

Run in command line

You can run “PostgreSQL table to MongoDB collection” conversion in command line.

When you save session, you can click “Save & Make Batch File”.

Import data from PostgreSQL table to MongoDB collection - save session

The “Save & Make Batch File” form shows.

Import data from PostgreSQL table to MongoDB collection - create batch file

Click “OK” button, you’ll create a batch file, in Windows, like this:

C:
cd "C:\Users\pansh\AppData\Local\Programs\DBToMongo"
DBToMongo task="C:\Users\pansh\Documents\test.uld" logfile="C:\Users\pansh\Documents\test.log"

You can run this batch file in command line.

Run as scheduled task

You can run “PostgreSQL table to MongoDB collection” conversion automatically at specific time.

On Linux/macOS, you can use Crontab.

For macOS, How to Fix Cron Permission Issues in macOS.

On Windows, in “Save & Make Batch File” form, you can click “Create & Schedule Task” to set a scheduled task.

Import data from PostgreSQL table to MongoDB collection - create batch file

And then, with scheduled task wizard, step by step.

Import data from PostgreSQL table to MongoDB collection - scheduled task application

Import data from PostgreSQL table to MongoDB collection - scheduled task name

Import data from PostgreSQL table to MongoDB collection - scheduled task time

Import data from PostgreSQL table to MongoDB collection - scheduled task user

Import data from PostgreSQL table to MongoDB collection - scheduled task information

You’ll see created task listed in scheduled task list.

scheduled task list

Download

Here you can download DBToMongo, and buy DBToMongo.

Download DBToMongo Download DBToMongo