Insert

../../../../_images/insert_mongodb.svg

Insert a single document into the database

Documentation

Insert a single document into the database.

For info on how to input data to MongoDB, see MongoDB data format.

Definition

Input ports

mongodb
Type: mongodb
Description: MongoDB
document
Type: json
Description: Document

Output ports

mongodb
Type: mongodb
Description: MongoDB
Optional number of ports: 0–1 (default: 1)
inserted
Type: json
Description: Insert result
Optional number of ports: 0–1 (default: 1)
write_operation
Type: json
Description: Write operation. Output write operation instead of performing the operation directly. The write operation can be used as an element in a bulk write input list
Optional number of ports: 0–1 (default: 0)

Examples

Example flows demonstrating this node:

Implementation

class node_mongodb.MongoDBInsertOne[source]