Skip to main content
MongoDB is a NoSQL document database. Connecting it binds a single MongoDB collection to an Adriel data source, sampling documents at setup to discover fields and compiling each widget load into an aggregation pipeline so document data appears in dashboards alongside SQL databases and marketing connectors.

Before you connect

The following are required:
  • A reachable MongoDB deployment (self-hosted, MongoDB Atlas, or a managed service).
  • Network access from the platform egress IP 52.79.160.224, including an Atlas IP access-list entry when applicable.
  • A dedicated read-only database user.
  • A MongoDB connection string (mongodb://... or mongodb+srv://...), or equivalent host, port, user, and password values.
  • The target database name.
  • The authentication source database (typically admin for Atlas, or the application database for self-hosted deployments).

Connect MongoDB

1

Allow-list the egress IP and create a read-only user

Sign in to the MongoDB platform. Open the Network Access tab and click + ADD IP ADDRESS, enter 52.79.160.224 in the Access List Entry field, and click Confirm to allow-list the platform egress IP. Then open the Database Access tab, click Edit under the Actions column, and configure the user: set Authentication Method to Password, set a Password and keep a record of it, and set the Built-in Role to Atlas admin (or, for self-hosted deployments, a user with the read role on the target database). Click Add User.
2

Copy the connection string

Open the Database tab and click Connect, then click Compass. Copy the connection string shown under 2. Copy the connection string, then open MongoDB Compass — this is the database URL needed in the next step.
3

Enter the connection details

On the Data Sources page, search for MongoDB and select it. Fill in the connection URL copied in the previous step, and use the password set earlier for authentication.
4

Select the database and collections

Choose one database and its collection(s). Each data source binds to a single database, and multiple collections are allowed. To connect more than one database, repeat this connection flow.
5

Set optional fields and submit

Optionally fill in the Alternative Channel Name to set a display name, and the File Name to Filter field to scope the connection to documents matching a name pattern. Click Submit to complete the connection. Initial data availability can take up to one business day.

What gets imported

Each widget load compiles into a MongoDB aggregation pipeline executed against the bound collection. Numeric fields aggregate into metrics, and text, boolean, and date fields surface as breakdowns. Nested sub-documents are flattened using dotted path notation, and arrays are handled through pipeline operators rather than expanded into rows. A default 1,000-document limit applies to every pipeline result. For the complete metric list, type mapping, and pipeline-stage behavior, see the MongoDB data reference.

Troubleshooting

Confirm the user exists in the configured authentication source. Atlas users almost always live in admin; self-hosted users typically live in the database where the role was granted. Update the auth-source field to match.
The deployment is unreachable from the platform egress IP range. Update the Atlas IP access list or firewall rules to include 52.79.160.224, and confirm the connection string host and port are correct.
Non-numeric fields default to a collected-set aggregation. When a single group contains more than one distinct value, the cell renders as - to keep the result scalar. Set an explicit aggregation on the field, or refine the breakdown so each group resolves to one value.
Documents in the same collection can have different shapes. Documents missing the field are returned as NULL. Reshape the collection upstream, or use a MongoDB view to enforce a consistent projection.
A 1,000-document limit is applied to every pipeline. Tighten widget filters or pre-aggregate in MongoDB to keep results within the cap.

MongoDB data reference

Metrics, type mapping, and pipeline-stage behavior for MongoDB.

MongoDB FAQs

Common questions and expected behaviors for the MongoDB data source.

How to connect MySQL

Connect a MySQL or MariaDB table as a SQL database alternative.

How to connect Postgres

Connect a PostgreSQL database with richer filter operators.