mongodb_console: MongoDB (bulk) commands

Description Usage Arguments Details References Examples

View source: R/utils.R

Description

MongoDB (bulk) commands

Usage

1
mongodb_console(Argument = NULL, ...)

Arguments

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.

Details

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).

References

https://docs.mongodb.com/database-tools/mongoimport/, https://docs.mongodb.com/database-tools/mongoexport/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

library(GeoMongo)

ARGs = "mongoimport -d DB -c COLLECTION --type json --file /MY_DATA.json"

mongodb_console(Argument = ARGs)


## End(Not run)

GeoMongo documentation built on Sept. 11, 2021, 5:06 p.m.