MongoDB (bulk) commands
mongodb_console(Argument = NULL, ...)
Argument | a character string specifying the mongodb shell command to run from within an R-session |
---|---|
... | the ellipsis (...) parameter allows a unix-user (windows-user) to give additional parameters to the base-R system() (shell()) function which is run in background. |
MongoDB shell commands are important for instance if someone has to import/export bulk data to a mongo database. This R function utilizes the system base function to run the mongodb shell command from within an R-session. See the reference links for more details. The ellipsis (...) parameter could be used for instance to disallow messages be printed in the console (on unix by using ignore.stdout and ignore.stderr).
https://docs.mongodb.com/database-tools/mongoimport/, https://docs.mongodb.com/database-tools/mongoexport/
if (FALSE) { library(GeoMongo) ARGs = "mongoimport -d DB -c COLLECTION --type json --file /MY_DATA.json" mongodb_console(Argument = ARGs) }