As the title states: Is there a way with any of the mongodb-clients in R to execute atomic transactions? If so, how would I do this? I couldn't find any documentation on this topic.
Asked
Active
Viewed 37 times
1 Answers
0
I think you should be able to use DBI
that package allows for transactions (dbBegin
, dbCommit
usw). It seems you can make a connection with odbc
: https://db.rstudio.com/databases/mongodb/ . I have not tested this but it seems it should work.

Bart
- 1,267
- 7
- 18
-
Thanks for your reply. As I'm not using RStudio Professional, it seems that I would need to install one of the third-party ODBC drivers listed here: https://stackoverflow.com/a/66122921/1003358. So the workflow would be: install the driver --> register in `odbcinst.ini` --> use `DBI` with `odbc` as shown in the link you've provided. Is this right? And it seems that there is no way to do this for free and without hassle (like normal operations via e.g. `mongolite`)? – AnjaM Oct 07 '21 at 07:30
-
I have no experience with mongodb nor with `mongolite` so I dont know any more details. a quick scan over `mongolite` seems to not show support for transactions – Bart Oct 07 '21 at 07:42