Use MongoDBWhat is MongoDB? MongoDB is an open-source leading NoSQL database. A non-relational database is called a NoSQL database. Instead of using tables and rows as in relational databases, MongoDB is built on an architecture of collections and documents. The collections are an equivalent of RDBMS tables. A collection holds one or more documents, which corresponds to a record or a row in a relational database table, and each document has one or more fields, which corresponds to a column in a relational database table. MongoDB uses JSON documents in order to store records, just as tables and rows store records in a relational database. MongoDB represents JSON documents in binary-encoded format called BSON behind the scenes. How to use MongoDB in Xalt | Integration? Xalt | Integration's DBReader and DBWriter components can leverage the MongoDB database. You can now preform a variety of MongoDB create, read, update, and read (CRUD) operations from the DBReader and DBWriter components. Each instance of a DBReader or DBWriter component represents a single MongoDB database on a single server with multiple collections. The MongoDB feature uses the Database Type NoSQL and the Connection Type MongoDB. The Database Type NoSQL must be selected to view the dialog to enter Collection names. Establishing a connectionXalt | Integration currently follows MongoDB 3.4 standards for the connection string. Specify the connection string in the format shown below: mongodb://[username:password@]host1[:port1][/[databaseName][?options]]
Database and Collections
CommandsAction Parameters
The following table lists the commands for DBReader and DBWriter.
Keywords
DBReader
DBWriter
Example commands// Create {insert: "Component_Collection", documents: [ { "gender": "male", "name": { "first": "reginald", "last": "sanders" }, "location": { "street": "1952 church lane", "city": "leeds", "state": "shropshire", "postcode": "G0 6BR" } }, { "gender": "female", "name": { "first": "bobbie", "last": "perez" }, "location": { "street": "7902 mcgowen st", "city": "geelong", "state": "western australia", "postcode": 9250 } } ] } // Query 1 {find: "Component_Collection", filter: {"name.first": "bobbie" } } // Query 2 { listCollections: 1} } // Update { update: "Database_Collection", updates: [ { q: {"street": "7902 mcgowen st"}, u: { $set: { "street": "187 king st" }}, multi: true } ] } // Delete {delete: "Component_Collection", deletes: [ { q: {"name.first": " bobbie "}, limit: 0 } ] }
|