MongoDB
Connect a MongoDB database or Atlas cluster with a connection string. Collections become datasets; documents are flattened into rows.
Reads collections from any MongoDB database or Atlas cluster. Each collection is a dataset, and documents are flattened into rows (nested fields become dot-notation columns) with columns inferred by sampling. Flitch only reads, so use a database user with read access.
Add a source
MongoDB connects with a connection string (the MongoDB URI, which carries the host and credentials).
Prerequisites
- A reachable MongoDB host or Atlas cluster.
- A database user with read access to the collections you want.
Create a read-only user
In mongosh (or the Atlas UI), create a user with the built-in read role on your database:
use mydb
db.createUser({
user: 'flitch_readonly',
pwd: 'choose-a-strong-password',
roles: [{ role: 'read', db: 'mydb' }]
})Build the connection string
mongodb+srv://flitch_readonly:password@cluster.mongodb.netUse mongodb+srv:// for Atlas (SRV) or mongodb://host:27017 for a self-hosted server. Copy the Atlas string from Atlas → Connect → Drivers.
Open the form
Go to Data → Add → MongoDB, paste the connection string, enter the database name, then pick collections.
Network access
Flitch connects from its own server, not your browser, so if your cluster restricts access you must allow Flitch's connector egress IP (shown in the Add Source form). On Atlas, add it under Network Access → IP Access List. (Allowing access from anywhere works too but is less secure.)
How documents map to rows
- Each collection is a dataset; each document is a row.
- Nested objects become dot-notation columns (e.g.
address.city); arrays are kept as JSON. ObjectId,Date, and other BSON types are converted to plain strings/numbers.- Columns are inferred by sampling documents, so collections with very different document shapes may show a sparse column set.
Refresh
Refresh is off by default. Enable it to schedule a background refresh and serve from cache between runs. See Refresh.
Disconnect
Delete the connection from Data. Dashboards built from it keep their last cached data until you remove them.
Troubleshooting
Authentication failed. Check the username and password in the connection string, and that the user has the read role on the database.
Connection timed out. Verify the host, and that the connector egress IP is allowlisted (Atlas → Network Access).
No collections shown. Confirm the database name is correct and the user can list collections on it.