Connect MongoDB Atlas SQL
Prepare an Atlas SQL endpoint, enter its ODBC connection values, and check a collection query.
This connector uses the MongoDB Atlas SQL ODBC driver. An ordinary MongoDB application URI is not enough to connect through it.
1. Check Atlas SQL prerequisites
You need permission to manage datasources in Querio and an Atlas database user with read access to the collection you want to query. The database user is separate from your Atlas project user.
Ask your Atlas administrator to confirm:
- The SQL Interface is enabled for the selected dedicated cluster or federated database instance. A dedicated cluster must meet MongoDB's SQL Interface requirements, including
M10or higher and MongoDB 6.0 or later. - A SQL schema exists for the collection. Dedicated clusters use the MongoDB SQL Schema Builder CLI; federated instances use Atlas Data Federation schema management. These schemas are not interchangeable.
- The database user's role allows queries on the intended data. For a dedicated cluster, that can be
readon the database or a narrower approved custom role. For a federated instance, confirm a supported query role for its namespace. - Querio's gateway can reach the SQL endpoint and the Atlas IP access list allows its source address. A private endpoint also needs a network route from the gateway.
2. Gather the ODBC connection values
In the Atlas cluster or federated instance Connect dialog, choose Atlas SQL Interface, then the ODBC option. Get the SQL Interface connection URI and database name for that endpoint, plus the database user's name and password. MongoDB's driver setup describes the ODBC values.
Use the SQL Interface URI without embedded credentials. Keep the password in the Querio connection form, not in a prompt, source file, screenshot, or support message. Retain the TLS settings supplied by Atlas; do not disable certificate checks to make a failed connection pass.
If Atlas needs Querio's source address, use Copy IP Address in the datasource form, confirm the address for your deployment with Querio, and ask the Atlas administrator to allow it.
3. Connect in Querio
Open workspace Settings > Datasources > Add datasource. Choose Internal, enter a unique Slug, and select MongoDB Atlas. Enter:
| Field | Value |
|---|---|
| Uri | The URI from Atlas Connect > Atlas SQL Interface for this endpoint. |
| Database | The Atlas SQL database name, for example sample_mflix. |
| User | The Atlas database user, for example querio_reader. |
| Password | That user's password, entered in the form. |
Querio passes these values to the Atlas SQL ODBC driver. There is no local DSN, JDBC URL, or separate Schema field. Select Test connection, then Create. Querio tests the connection again when creating the datasource.
The test runs SELECT 1. It checks connectivity, but does not establish that the collection's SQL schema or read permissions are ready. For the shared connection and credential workflow, see Connect a datasource.
4. Verify a collection query
In Context, add the collection to the datasource catalog and check that its expected columns appear. Querio shows the selected database as one schema and its collections as tables. The columns come from the SQL schema prepared in Atlas.
Open an Explore as a user who can query this datasource. Replace the collection, fields, and known title in this MongoSQL example with values from your own collection:
SELECT title, year
FROM movies
WHERE title = 'KNOWN_TITLE'
LIMIT 5;Use columns that appear in the catalog and compare the rows with a trusted Atlas result for the same database user and filter. An empty result may be correct; check the predicate and SQL schema before treating it as proof of access. Collections with mixed document shapes may not support SELECT *, so select the fields you need. MongoDB's MongoSQL reference covers the clauses in this query.
If a teammate will query this datasource, have them run the same check with their own Querio account. They need datasource permission and exactly one distinct authorized credential; datasource management permission alone does not grant query access. The first credential is initially assigned to Everyone, so review that assignment against your access policy. See credential selection.
If a check fails
| Symptom | Check |
|---|---|
| Connection test fails | SQL Interface URI, database user and password, authentication source in the URI, Atlas IP access list, network route, TLS settings, and SQL Interface state. |
| Collection is missing or has no columns | Selected database and upstream SQL schema. Ask the Atlas administrator to update the schema for the correct deployment type, then refresh Querio's catalog. |
| Query fails or returns unexpected rows | Database user's effective read access, generated field types, exact field names, and filter. Compare with a trusted result. |
| One Querio user cannot query | Their datasource permission and effective credential assignment. An administrator's successful connection test does not establish another user's access. |
Once the query works, add context for the collection and check a business answer.
Last updated on November 18, 2026