MongoDBWrite performs write operations on a Mongo database.
Mongo is a NoSql database, which provides a mechanism for storage and retrieval of data that is different to the tabular relations used in relational databases like SQL Server, MySql and Oracle.
Properties
Connection string
Configuration values required by the data provider to connect to the data source. learn more
Collection
The collection to write to.
Operation
The operation to perform.
Options:
Insert
Inserts a single object (specified in the
data property) into the database.
Update
Applies an update operation to
any documents in the database that matches the
criteria property.
Replace
Replaces a single document in the database with the object in
the data property. The document to be
replaced can either be specified by the
criteria property, or by the ID
attribute of the replacement document.
Delete
Deletes one or more documents in the database which match the
criteria property.
The selection of an Operation will determine which specific properties will display for you to complete.
What are ID Attributes?
Each document in a MongoDb collection is uniquely identified by an Object
ID field called "_id". This field is automatically created whenever a new document is inserted into the database, and cannot be changed by update or replace operations.
When using the object id as an element in the criteria
field, the string value will need to be converted back to a Mongo object id. For example, a document with id "525bc19331eec126ecdcf199" can be matched by using the
criteria:
{
_id: ObjectId("525bc19331eec126ecdcf199")
}
When running a replace operation without
specifying any criteria, the function will attempt to replace a document
in the database whose id matches a string field named "id" or "_id" in the replacement object. This allows objects to be read from the database using the MongoDBRead function, altered and written back to the database without requiring a replacement
criteria.