MongoDB Resource Node

The MongoDB Resource makes it easy to pull data out of a MongoDB instance and display or process it within Dynaboard.

Configuration Steps

  1. Find the connection parameters or the connection string for your database.
    • Connection strings follow the format protocol://username:password@hostname:port/databaseName?[options]
  2. Fill in the required connection information in the resource properties panel.
    • Secret fields (e.g. passwords or certificates) require clicking the ✓ to the right of the field to save the input.
  3. It's recommended to always enable SSL.
  4. If your database is behind a firewall (very common), you'll need to allow Dynaboard's outbound IP address.
  5. Click "Test Connection" at the bottom of the panel to verify everything works!

Common Configuration Errors

  • If the connection errors after a while, you may not have configured the firewall rules properly.
  • A secret may be unsaved (e.g. passwords or certificates). Click the ✓ to the right of the field to save it. The text will disappear after a successful save.
  • We don't currently support X.509 certificates for authentication.
  • We don't currently support CA certificates during authentication.

Properties

MongoDB protocol

PropmongoDbNode.dbProtocol
TypeMongoDbResourceNodeProtocol ('-' | 'mongodb://' | 'mongodb+srv://')
Default-

Protocol to use when connecting to the MongoDB server.

MongoDB host

PropmongoDbNode.dbHost
Typestring
Default127.0.0.1

Hostname or IP address to use for the connection. E.g. this-entire-string.is-the-hostname.com

MongoDB port

PropmongoDbNode.dbPort
Typestring
Default27017

Port to use for the connection.

Database

PropmongoDbNode.dbDatabaseName
Typestring
Defaultundefined

The database name to use for the connection.

Username

PropmongoDbNode.dbUser
Typestring
Defaultuser

The username to use for the connection.

Password

PropmongoDbNode.dbPass
Type({ ref: string } | undefined)
Defaultundefined

The password to use for the connection.

SSL

PropmongoDbNode.dbSSL
Typeboolean
Default{{true}}

Disable to remove SSL encryption. Not recommended to disable.

SSL CA

PropmongoDbNode.dbSSLCA
Type({ ref: string } | undefined)
Defaultundefined

CA cert to validate MongoDB server.

Actions

Aggregate

Run aggregation pipeline

ParameterTypeDefault
queryAggregatestring{}
collectionstring``

Count

Count all documents matching the query

ParameterTypeDefault
queryCountstring{}
collectionstring``

Delete many

Delete multiple documents matching the query

ParameterTypeDefault
collectionstring``
queryDeleteManystring``

Delete one

Delete one document matching the query. In case there are multiple documents that are matching the query, the first one will be deleted.

ParameterTypeDefault
collectionstring``
queryDeleteOnestring``

Distinct

Return all distinct values of a field

ParameterTypeDefault
fieldstring``
collectionstring``
queryDistinctstring{}

Find

Find all documents matching the query

ParameterTypeDefault
queryFindstring{}
collectionstring``
projectionstring``
sortBystring``
limitstring``
skipstring``

Find one

Find one document matching the query

ParameterTypeDefault
queryFindOnestring{}
collectionstring``
projectionstring``
sortBystring``
limitstring``
skipstring``

Find one and update

Find one document matching the filter, and then apply the update. Returns updated document.

ParameterTypeDefault
collectionstring``
filterFindOneAndUpdatestring``
updateFindOneAndUpdatestring``
projectionstring``

Insert many

Insert many documents at the same time

ParameterTypeDefault
collectionstring``
documentInsertManystring``

Insert one

Insert one document

ParameterTypeDefault
collectionstring``
documentInsertOnestring``

List collections

List all collections from the database

ParameterTypeDefault

Update many

Update many documents, or create new ones if the upsert is set to true.

ParameterTypeDefault
collectionstring``
filterUpdateManystring``
updateUpdateManystring``
upsertUpdateManystringtrue

Update one

Update one document, or create new one if the upsert is set to true.

ParameterTypeDefault
collectionstring``
filterUpdateOnestring``
updateUpdateOnestring``
upsertUpdateOnestringtrue