← All nodes
Output

MongoDB Output

Writes the rows as documents to a MongoDB collection: insert, replace the collection, or upsert by key columns.

When to use it

Use it to keep a collection of profiles or reference data in step with a cleaned source.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
ConnectionselectYesAdd a connection below
Target TableselectYesSelect a table
Write Modeselect—append
Key columnsselect—Columns that identify a row

Example

Upsert profiles

  • Target Table=customers
  • Write Mode=Upsert (update rows whose key exists)
  • Key columns=email
Rows arriving
emailname
ann@example.comAnn Lee
Passed on; the document with that email is replaced or added
emailname
ann@example.comAnn Lee

Worth knowing

  • Each row becomes one document; columns become fields, and text holding JSON goes back as a sub-document.
  • Upsert replaces the document whose key fields match (replaceOne with upsert).
  • Under a Transaction Control the writes run in a MongoDB transaction, which needs a replica set — Atlas is one.

Others in Output