Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

MongoDB Connector Reference

MongoDB is an open source, high-performance, schema-free, document-oriented database that manages collections of BSON documents.

Configurations


Config

Parameters

Name Type Description Default Value Required

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types that can be provided to this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before the runtime considers it eligible for expiration. This does not mean that the platform will expire the instance at the exact moment that it becomes eligible. The runtime will actually purge the instances when it sees it fit.

Enable Metadata

Boolean

collectionMetadataSamples: Stores templates to build metadata based on Document parameters union Key (String): Collection Name. List : List of ObjectIDs Documents in specific collection.

true

Collection Metadata samples

Object

Connection Types

Connection
Parameters
Name Type Description Default Value Required

Servers (host:port)

String

A list of MongoDB instance, with the format host:port, separated by commas.

 Example: 127.0.0.1:27017, 192.168.1.2:27017 

localhost:27017

Connections Per Host

Number

The number of connections allowed per host (the pool size, per host)

100

Threads Allowed To Block For Connection Multiplier

Number

Multiplier for connectionsPerHost for # of threads that can block.

5

Max Wait Time

Number

The max wait time for a blocking thread for a connection from the pool in ms.

120000

Connect Timeout

Number

The connection timeout in milliseconds; this is for establishing the socket connections (open). 0 is default and infinite.

30000

Socket Timeout

Number

The socket timeout. 0 is default and infinite.

0

Username

String

Password

String

the password to use for authentication. If the password is null or whitespaces only, the connector won't use authentication and username must be empty too.

Database

String

x

SSL

Boolean

This is for enabling an SSL connection. It is disabled by default.

false

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn't pass after exhausting the associated reconnection strategy

Connection String
Parameters
Name Type Description Default Value Required

Connection URI

String

x

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn't pass after exhausting the associated reconnection strategy

Operations

Add User

<mongo:add-user>

Adds a new user to a database.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Username

String

Name of the user

x

Password

String

Password that will be used for authentication

x

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Count Documents

<mongo:count-documents>

Counts the number of documents that match the given query. If no query is passed, returns the number of elements in the collection

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the target collection

x

Condition Query

Binary

the optional String query for counting documents. Only documents matching it will be counted. If unspecified, all documents are counted.

#[payload]

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Number

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Create Collection

<mongo:create-collection>

Creates a new collection. If the collection already exists, a MongoException will be thrown.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection to create

x

Capped

Boolean

if the collection will be capped

false

Max Objects

Number

the maximum number of documents the new collection is able to contain

Collection Size

Number

the maximum size of the new collection

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Create File From Payload

<mongo:create-file-from-payload>

Creates a new MuleGridFSFile in the database, saving the given content, filename, contentType, and extraData, and answers it.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Content

Binary

the mandatory content of the new gridfs file. It may be a java.io.File, a byte[] or an InputStream.

#[payload]

Filename

String

the mandatory name of new file.

x

Metadata

Binary

the optional String metadata of the new content type

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Object

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Create Index

<mongo:create-index>

Creates a new index

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection where the index will be created

x

Field Name

String

the name of the field which will be indexed

x

Order

Enumeration, one of:

  • ASC

  • DESC

the indexing order

ASC

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Drop Collection

<mongo:drop-collection>

Deletes a collection and all the objects it contains. If the collection does not exist, does nothing.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection to drop

x

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Drop Database

<mongo:drop-database>

Drop the current database

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Drop Index

<mongo:drop-index>

Drops an existing index

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection where the index is

x

Index Name

String

the name of the index to drop

x

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Dump

<mongo:dump>

Executes a dump of the database to the specified output directory. If no output directory is provided then the default /dump directory is used.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Output Directory

String

output directory path, if no output directory is provided the default /dump directory is assumed

dump

Output Name

String

output file name, if it's not specified the database name is used

Zip

Boolean

whether to zip the created dump file or not

false

Oplog

Boolean

point in time backup (requires an oplog)

false

Threads

Number

amount of threads to execute the dump

5

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Execute Command

<mongo:execute-command>

Executes a command on the database

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Command Name

String

The command to execute on the database

x

Command Value

String

The value for the command

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Exists Collection

<mongo:exists-collection>

Answers if a collection exists given its name

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection

#[payload]

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Boolean

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Find Documents

<mongo:find-documents>

Finds all documents that match a given query. If no query is specified, all documents of the collection are retrieved. If no fields object is specified, all fields are retrieved.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the target collection

x

Condition Query

Binary

the optional String query document. If unspecified, all documents are returned.

#[payload]

Fields

Array of String

alternative way of passing fields as a literal List

Num To Skip

Number

number of documents skip (offset)

Result Limit

Number

limit of documents to return

Sort By

Binary

indicates the String used to sort the results

Return Id

Boolean

boolean that indicates if a Id is return in the response

true

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Find Files

<mongo:find-files>

Lists all the files that match the given query

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Find Query

Binary

a String query

x

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Array of Object

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Find One And Update Document

<mongo:find-one-and-update-document>

Finds and update the first document that matches a given query. When returnNew = true, returns the updated document instead of the original document.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the target collection

x

Find Query

Binary

the String query that the returned object matches.

Content To Update

Binary

the String mandatory object that will replace that one which matches the query

x

Fields

Array of String

alternative way of passing fields as a literal List

Return New Document

Boolean

Flag to specify if the returning org.bson.Document should be the updated document instead of the original. Defaults to false, returning the document before modifications

false

Sort By

Binary

indicates the String used to sort the results.

Remove

Boolean

removes the specified in the query field. Defaults to false

false

Upsert

Boolean

whether the database should create the element if it does not exist

false

Bypass Document Validation

Boolean

lets you update documents that do not meet the validation requirements. Defaults to false

false

Return Id

Boolean

boolean that indicates if a Id is return in the response

false

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Find One Document

<mongo:find-one-document>

Finds the first document that matches a given query. Throws a MongoException if no one matches the given query

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the target collection

x

Find Query

Binary

the mandatory String query document that the returned object matches.

#[payload]

Fields

Array of String

alternative way of passing fields as a literal List

Fail On Not Found

Boolean

Flag to specify if an exception will be thrown when no object is found. For backward compatibility the default value is true.

true

Return Id

Boolean

boolean that indicates if a Id is return in the response

true

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Find One File

<mongo:find-one-file>

Answers the first file that matches the given query. If no object matches it, a MongoException is thrown.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Find Query

Binary

the String mandatory query

x

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Object

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Get File Content

<mongo:get-file-content>

Answers an inputstream to the contents of the first file that matches the given query. If no object matches it, a MongoException is thrown.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

File Id

the MuleBsonObjectId of the file to be deleted

#[payload]

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Incremental Dump

<mongo:incremental-dump>

Executes an incremental dump of the database

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Output Directory

String

output directory path, if no output directory is provided the default /dump directory is assumed

dump

Incremental Timestamp File

String

file that keeps track of the last timestamp processed, if no file is provided one is created on the output directory

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Insert Document

<mongo:insert-document>

Inserts a document in a collection, setting its id if necessary.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection where to insert the given document.

x

Document

Binary

a String instance.

#[payload]

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

String

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Insert Documents

<mongo:insert-documents>

Inserts a list of documents in a collection, setting its id if necessary.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection where to insert the given document.

x

Documents

Binary

a java.util.List of String.

#[payload]

Write Ordered

Boolean

indicates if the list of write operations is ordered or unordered. By default, ff an error occurs during the processing of one of the write operations, MongoDB will return without processing any remaining write operations in the list.

false

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

List Collections

<mongo:list-collections>

Lists names of collections available at this database

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

List Files

<mongo:list-files>

Lists all the files that match the given query, sorting them by filename. If no query is specified, all files are listed.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Find Query

Binary

the String optional query

x

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Array of Object

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

List Indices

<mongo:list-indices>

List existent indices in a collection

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection

x

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Map Reduce Objects

<mongo:map-reduce-objects>

Transforms a collection into a collection of aggregated groups, by applying a supplied element-mapping function to each element, that transforms each one into a key-value pair, grouping the resulting pairs by key, and finally reducing values in each group applying a suppling 'reduce' function. Each supplied function is coded in JavaScript. Note that the correct way of writing those functions may not be obvious; please consult MongoDB documentation for writing them.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection to map and reduce

x

Mapping Function

String

a JavaScript encoded mapping function

x

Reduce Function

String

a JavaScript encoded reducing function

x

Output Collection

String

the name of the output collection to write the results, replacing previous collection if existed, mandatory when results may be larger than 16MB. If outputCollection is unspecified, the computation is performed in-memory and not persisted.

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Remove Documents

<mongo:remove-documents>

Removes all the documents that match the a given optional query. If query is not specified, all documents are removed. However, please notice that this is normally less performant that dropping the collection and creating it and its indices again

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the collection whose elements will be removed

x

Find Query

Binary

the optional String query object. Documents that match it will be removed.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Remove Files

<mongo:remove-files>

Removes the file that matches the given file id. If no file id is specified, all files are removed

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

File Id

the MuleBsonObjectId of the file to be deleted

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Restore

<mongo:restore>

Takes the output from the dump and restores it. Indexes will be created on a restore. It only does inserts with the data to restore, if existing data is there, it will not be replaced.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Input Path

String

input path to the dump files, it can be a directory, a zip file or just a bson file

dump

Drop Collection

Boolean

whether to drop existing collections before restore

false

Oplog Replay

Boolean

replay oplog for point-in-time restore

false

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Save Document

<mongo:save-document>

Inserts or updates a document based on its object _id.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the collection where to insert the object

x

Document

Binary

the mandatory String document to insert.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Update Documents

<mongo:update-documents>

Updates documents that matches the given query. If query is not specified, all documents are retrieved. If parameter multi is set to false, only the first document matching it will be updated. Otherwise, all the documents matching it will be updated.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection to update

x

Find Query

Binary

the String query object used to detect the element to update.

Content To Update

Binary

the String mandatory object that will replace that one which matches the query.

x

Multiple Update

Boolean

if all or just the first document matching the query will be updated

true

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Update Documents By Function

<mongo:update-documents-by-function>

Update documents using a mongo function. If query is not specified, all documents are retrieved.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection to update

x

Function

String

the function used to execute the update

x

Find Query

Binary

the String query document used to detect the element to update.

Content To Update

Binary

the String mandatory document that will replace that one which matches the query.

x

Upsert

Boolean

if the database should create the element if it does not exist.

false

Multiple Update

Boolean

if all or just the first document matching the query will be updated.

true

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Update Documents By Functions

<mongo:update-documents-by-functions>

Update documents using one or more mongo function(s). If query is not specified, all documents are retrieved. If there are duplicated operators. Only the last one will be executed.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Collection Name

String

the name of the collection to update

x

Find Query

Binary

the String query document used to detect the element to update

Functions

Binary

the String of functions used to execute the update. e.g. <$set,{"key":123}>

x

Upsert

Boolean

whether the database should create the element if it does not exist

false

Multiple Update

Boolean

if all or just the first document matching the query will be updated

true

Streaming Strategy

Configure if repeatable streams should be used and their behavior

Target Variable

String

The name of a variable on which the operation's output will be placed

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

For Configurations

Throws

  • MONGO:WRITE_CONCERN

  • MONGO:RETRY_EXHAUSTED

  • MONGO:UNKNOWN

  • MONGO:SERVER_ERROR

  • MONGO:BULK_WRITE

  • MONGO:IO_EXCEPTION

  • MONGO:SOCKET_READ_ERROR

  • MONGO:WRITE

  • MONGO:CLIENT_EXCEPTION

  • MONGO:QUERY_ERROR

  • MONGO:NODE_IS_RECOVERING

  • MONGO:MONGO_GRID_FS

  • MONGO:INVALID_CREDENTIALS

  • MONGO:EXECUTION_TIMEOUT

  • MONGO:SOCKET

  • MONGO:COMMAND_ERROR

  • MONGO:MongoExecution

  • MONGO:SOCKET_CLOSED

  • MONGO:SECURITY

  • MONGO:WAIT_QUEUE_FULL

  • MONGO:CURSOR_NOT_FOUND

  • MONGO:SOCKET_OPEN

  • MONGO:INTERNAL_EXCEPTION

  • MONGO:INTERRUPTED

  • MONGO:SOCKET_WRITE_ERROR

  • MONGO:CONNECTIVITY

  • MONGO:NOT_PRIMARY

  • MONGO:TIMEOUT

  • MONGO:DUPLICATE_KEY

  • MONGO:INCOMPATIBLE_DRIVER

  • MONGO:SOCKET_READ_TIMEOUT

  • MONGO:MAPPING_EXCEPTION

  • MONGO:ILLEGAL_ARGUMENT

Types

Reconnection

Field Type Description Default Value Required

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy

Reconnection Strategy

The reconnection strategy to use

Reconnect

Field Type Description Default Value Required

Frequency

Number

How often (in ms) to reconnect

Count

Number

How many reconnection attempts to make

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often (in ms) to reconnect

Expiration Policy

Field Type Description Default Value Required

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

Repeatable In Memory Stream

Field Type Description Default Value Required

Initial Buffer Size

Number

This is the amount of memory that will be allocated in order to consume the stream and provide random access to it. If the stream contains more data than can be fit into this buffer, then it will be expanded by according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.

Buffer Size Increment

Number

This is by how much will be buffer size by expanded if it exceeds its initial size. Setting a value of zero or lower will mean that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error will be raised when the buffer gets full.

Max Buffer Size

Number

This is the maximum amount of memory that will be used. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error will be raised. A value lower or equal to zero means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which all these attributes are expressed

Repeatable File Store Stream

Field Type Description Default Value Required

Max In Memory Size

Number

Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed then it will start to buffer the content on disk.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed

Mule Bson Object Id

Field Type Description Default Value Required

Value

Object Id

Field Type Description Default Value Required

Counter

Number

Date

Date

Machine Identifier

Number

Process Identifier

Number

Time

Number

Time Second

Number

Timestamp

Number