Export from MongoDB as CSV + Upload on SFTP This project contains 3 possible solutions in python (app.py) to export data from mongo db and upload them to a sftp server. Experimental I am not a python expert :)
Connects to MongoDB and exports a single collection, with all its fields to a csv, via pymongo.
Using the command mongoexport to export a set of fields from MongoDB into a csv.
Using a bash script to call the commands mongo & mongoexport and export ALL collections with ALL fields from MongoDB into a csv. This script can also be used directly from the command line.