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
- Find the connection parameters or the connection string for your database.
- Connection strings follow the format
protocol://username:password@hostname:port/databaseName?[options]
- Connection strings follow the format
- 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.
- It's recommended to always enable SSL.
- If your database is behind a firewall (very common), you'll need to allow Dynaboard's outbound IP address.
- 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
Prop | mongoDbNode.dbProtocol |
---|---|
Type | MongoDbResourceNodeProtocol ('-' | 'mongodb://' | 'mongodb+srv://') |
Default | - |
Protocol to use when connecting to the MongoDB server.
MongoDB host
Prop | mongoDbNode.dbHost |
---|---|
Type | string |
Default | 127.0.0.1 |
Hostname or IP address to use for the connection. E.g. this-entire-string.is-the-hostname.com
MongoDB port
Prop | mongoDbNode.dbPort |
---|---|
Type | string |
Default | 27017 |
Port to use for the connection.
Database
Prop | mongoDbNode.dbDatabaseName |
---|---|
Type | string |
Default | undefined |
The database name to use for the connection.
Username
Prop | mongoDbNode.dbUser |
---|---|
Type | string |
Default | user |
The username to use for the connection.
Password
Prop | mongoDbNode.dbPass |
---|---|
Type | ({ ref: string } | undefined) |
Default | undefined |
The password to use for the connection.
SSL
Prop | mongoDbNode.dbSSL |
---|---|
Type | boolean |
Default | {{true}} |
Disable to remove SSL encryption. Not recommended to disable.
SSL CA
Prop | mongoDbNode.dbSSLCA |
---|---|
Type | ({ ref: string } | undefined) |
Default | undefined |
CA cert to validate MongoDB server.
Actions
Aggregate
Run aggregation pipeline
Parameter | Type | Default |
---|---|---|
queryAggregate | string | {} |
collection | string | `` |
Count
Count all documents matching the query
Parameter | Type | Default |
---|---|---|
queryCount | string | {} |
collection | string | `` |
Delete many
Delete multiple documents matching the query
Parameter | Type | Default |
---|---|---|
collection | string | `` |
queryDeleteMany | string | `` |
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.
Parameter | Type | Default |
---|---|---|
collection | string | `` |
queryDeleteOne | string | `` |
Distinct
Return all distinct values of a field
Parameter | Type | Default |
---|---|---|
field | string | `` |
collection | string | `` |
queryDistinct | string | {} |
Find
Find all documents matching the query
Parameter | Type | Default |
---|---|---|
queryFind | string | {} |
collection | string | `` |
projection | string | `` |
sortBy | string | `` |
limit | string | `` |
skip | string | `` |
Find one
Find one document matching the query
Parameter | Type | Default |
---|---|---|
queryFindOne | string | {} |
collection | string | `` |
projection | string | `` |
sortBy | string | `` |
limit | string | `` |
skip | string | `` |
Find one and update
Find one document matching the filter, and then apply the update. Returns updated document.
Parameter | Type | Default |
---|---|---|
collection | string | `` |
filterFindOneAndUpdate | string | `` |
updateFindOneAndUpdate | string | `` |
projection | string | `` |
Insert many
Insert many documents at the same time
Parameter | Type | Default |
---|---|---|
collection | string | `` |
documentInsertMany | string | `` |
Insert one
Insert one document
Parameter | Type | Default |
---|---|---|
collection | string | `` |
documentInsertOne | string | `` |
List collections
List all collections from the database
Parameter | Type | Default |
---|
Update many
Update many documents, or create new ones if the upsert
is set to true.
Parameter | Type | Default |
---|---|---|
collection | string | `` |
filterUpdateMany | string | `` |
updateUpdateMany | string | `` |
upsertUpdateMany | string | true |
Update one
Update one document, or create new one if the upsert
is set to true.
Parameter | Type | Default |
---|---|---|
collection | string | `` |
filterUpdateOne | string | `` |
updateUpdateOne | string | `` |
upsertUpdateOne | string | true |