Articles on: Connectors

MongoDB - Partner Connector

Overview


Mongodb connector create collection, list connection, Run Command. MongoDB is a powerful new database that makes it really easy to iterate and store non-relational data. No more crazy SQL queries and ALTER tables to add extra data!

Connect to Mongodb connector


Open the Easyflow portal, on the left panel Click on the icon (+) Connect to service and search for "Mongodb" connector and select:



Configure your connectivity to mongodb



You can connect a Mongodb connector to an earlier point within your current workflow on the left panel of the automate panel drag and drop "Mongodb" connector to the main panel

Select the Mongodb operation then select one of the available connections to connect



Syntax Cheat Sheet


https://blog.codecentric.de/files/2012/12/MongoDB-CheatSheet-v1_0.pdf
https://www.bmc.com/blogs/mongodb-cheat-sheet/
https://docs.mongodb.com/manual/reference/sql-comparison/
https://docs.mongodb.com/mongodb-shell/reference/methods#bulk-operation-methods
https://docs.mongodb.com/manual/reference/command/

List of Operations



Create collection


Creates a new collection
db.createCollection

List collections


Lists all collections in the current database
db.getCollectionNames

Run command


Runs a database command
db.runCommand
https://docs.mongodb.com/manual/reference/command/
\\ use double quotes "
{
 "listCollections": 1,
 "nameOnly": true
}


Documents count


Returns a count of the number of documents in a collection
db.collection.count

Insert a new document


Inserts a new document in a collection
db.collection.insertOne

Insert many documents


Inserts several new document in a collection
db.collection.insertOne

\\ if failed, no documents will be inserted
[{"_id": "123","fName": "peter_doc_5"},

{"_id": "000000000000000000000003", "fName": "peter_doc_6"},

{"_id": "123", "fName": "peter_doc_7"}]


Delete document by id


Deletes a single document in a collection by _id
db.collection.deleteOne

Delete multiple documents


Deletes multiple documents in a collection
db.collection.deleteMany

Return distinct


Returns an array of documents that have distinct values for the specified field
db.collection.distinct

Find


Query a collection
db.collection.find

Find and modify


Atomically modifies and returns a single document
db.collection.findAndModify

Update a document


Modifies a document in a collection
db.collection.update

Update many documents


Modifies multiple documents in a collection
db.collection.updateMany

Please find below a reference to REST API documentation
https://www.mongodb.com/docs/atlas/api/

Updated on: 20/07/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!