Copy data from MongoDB collection to PostgreSQL table without programming

by

Want to copy data from MongoDB collection to PostgreSQL table?

Using MongoToDB, a native GUI tool, you can transfer data from MongoDB collection to PostgreSQL table 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 MongoDB collection

export MongoDB collection to PostgreSQL table - source MongoDB collection

After converting, data in PostgreSQL table

Export data from MongoDB collection to PostgreSQL  table - view table

Copy

Please download and install MongoToDB, then run it.

Login to MongoDB.

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

Login to PostgreSQL.

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

Click “Import From Collection” at task dialog.

Import data from MongoDB collection to PostgreSQL table - Task Window

then show the wizard.

1. Choose source MongoDB collection.

Convert data from MongoDB collection to PostgreSQL table - open collection

2. Choose destination PostgreSQL table and config fields.

Extract MongoDB collection data to PostgreSQL table - choose table

3. Preview data.

Load data from MongoDB collection to PostgreSQL table - preview

4. Copy MongoDB data to PostgreSQL.

Transfer data from MongoDB collection to PostgreSQL table - Transfer

Click “View”, See PostgreSQL table data.

Export data from MongoDB collection to PostgreSQL  table - view table

Save/load session

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

1.Save Session.

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

Convert data from MongoDB collection to PostgreSQL table - save session

click “OK” button.

2.Load Session.

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

Convert data from MongoDB collection to PostgreSQL table - load session

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

Convert data from MongoDB collection to PostgreSQL table - start session

Run in command line

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

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

Convert data from MongoDB collection to PostgreSQL table - save session

The “Save & Make Batch File” form shows.

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

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

C:
cd "C:\Users\pansh\AppData\Local\Programs\MongoToDB"
MongoToDB 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 “MongoDB collection to PostgreSQL table” 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.

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

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

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

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

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

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

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

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

scheduled task list

Download

Here you can download MongoToDB, and buy MongoToDB.

Download MongoToDB Download MongoToDB