How to connect MongoDB and insert the data into Db?

I am trying to connect with the MongoDB database and also insert the model output data frame. The Database has showing connect but not showing all collection. Given an error authentication.
Please share any suggestions. Also, please check my code to connecting database.


Install Library

#install_github("Rmongo" , "tc")

connect to database

mongo <- mongoDbConnect("xxxxxx",host = " xxxxxx", port = 27017) # db name


auth <- dbAuthenticate(mongo,"username","password")


#show the collections
ListofTable <- dbShowCollections(mongo)

I would highly recommend using mongolite instead of Rmongo. I've never used Rmongo, but it has been archived, so it's safe to assume that it is no longer actively maintained. mongolite, on the other hand, has decent documentation - and it is being updated on the regular.

When I had to use mongoDB, I don't remember mongolite giving me any major troubles.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.