Skip to main content

mongodb

EXPERIMENTAL

This component is experimental and therefore subject to change or removal outside of major version releases.

Executes a find query and creates a message for each row received.

Introduced in version 3.64.0.

# Config fields, showing default values
input:
label: ""
mongodb:
url: ""
database: ""
collection: ""
username: ""
password: ""
query: ""

Once the rows from the query are exhausted this input shuts down, allowing the pipeline to gracefully terminate (or the next input in a sequence to execute).

Fields​

url​

The URL of the target MongoDB DB.

Type: string

# Examples
url: mongodb://localhost:27017

database​

The name of the target MongoDB database.

Type: string

collection​

The collection to select from.

Type: string

username​

The username to connect to the database.

Type: string
Default: ""

password​

The password to connect to the database.

Type: string
Default: ""

query​

Bloblang expression describing MongoDB query.

Type: string

# Examples
query: |2
root.from = {"$lte": timestamp_unix()}
root.to = {"$gte": timestamp_unix()}