- Host (the cluster DNS name for Atlas, or a hostname/IP)
- Port (default 27017; ignored when using an SRV connection)
- Database (optional — leave blank to query every database in the cluster)
- Auth Source (the database your user authenticates against;
adminfor most Atlas users) - Authentication credentials (username and password)
- SRV and TLS options
How TextQL queries MongoDB
MongoDB is a document database, so TextQL queries it with native aggregation pipelines (db.<collection>.aggregate([...])) rather than SQL. Collections appear as tables; nested document fields are exposed as dot-paths (address.city) and arrays as array fields you can $unwind. Query results are returned as a normal table.
Creating the Connector in TextQL
Navigate to the TextQL Connectors Page and click Create New Connector. Select MongoDB to open the configuration form. The form requires:- Connector Name: A descriptive name for this connection.
- Host: Your MongoDB host. For Atlas, the cluster DNS name (e.g.
cluster0.abc123.mongodb.net) — paste only the host, not the fullmongodb+srv://string. - Port: The MongoDB port (default 27017; ignored when SRV is enabled).
- Database: The database to query. Optional — leave blank to expose every (non-system) database, with collections referenced as
database.collection. When blank, the user needs thelistDatabasesprivilege. - Auth Source: The database the user authenticates against (default
admin). - Username / Password: Your MongoDB credentials.
- Use SRV connection: Enable for MongoDB Atlas (
mongodb+srv), which resolves the cluster’s hosts via DNS and implies TLS. - Use TLS: Enable TLS for the connection (required by Atlas).
MongoDB Atlas
For an Atlas cluster, your connection string looks like:mongodb+srv://<user>:<password>@cluster0.abc123.mongodb.net/
Map it to the form as:
- Host:
cluster0.abc123.mongodb.net - Use SRV connection: on
- Use TLS: on
- Auth Source:
admin - Username / Password: the database user’s credentials
Testing the Connection
After entering your credentials, click Create. TextQL validates the connection and creates the connector. If it fails, verify the host, credentials, and (for Atlas) the Network Access allowlist.Having trouble connecting? See the Network Configuration Guide for firewall and IP whitelisting setup.