Skip to content

Zenithar/mgoexport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mgoexport

Tool to export MongoDB Collection as CSV files (Golang)

Usage

mgoexport -db "test" -c "test" -o "test.csv"

Export ALL columns of ALL entries of the collection in the given CSV file

mgoexport -H 127.0.0.1:27017 -db "remote_test" -c "test" -o "remote.csv"

Same effect as the previous command but connect to a remote server

mgoexport -db "test" -c "test" -o "test.csv" -f "_id,range.to"

Only export fields named "_id", and subfield "range.to"

WARNING: No space in the fieldset.

Inspirations & Credits

json2csv

Kelley Robinson for the flattening algorithm

About

Tool to export MongoDB Collection as CSV files (Golang)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages