# MongoDB FAQ

Source: https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/faq/

Answers to common questions about the MongoDB connector. Sections are grouped by topic; pick the heading closest to what you are working on.

## Connecting

#### Does it work with MongoDB Atlas?

Yes, including the shared and Flex tiers. Enter the cluster address in **Host**, set **DNS Seed List (SRV)** to **Yes (mongodb+srv, e.g. Atlas)**, and add the Qualytics addresses to the Atlas IP access list. See the [Atlas example](https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/deep-dive/examples/).

#### Can I paste a connection string?

No. The form asks for the host, the port, and the options as separate fields, and the API refuses a connection string, so a password never ends up written into an address. Take the host names from your connection string, and enter the user and password in their own fields.

#### How do I connect to a replica set?

List every member with its port in **Host**, separated by commas, for example `mongo-1.internal:27017,mongo-2.internal:27017,mongo-3.internal:27018`, and leave **Port** empty. Every member name the replica set reports has to be reachable from your Qualytics deployment. See [Network access](https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/deep-dive/permissions/#network-access).

#### What is the Auth Source?

The database where the user is defined, which is usually `admin` and is the default. It is not the database you monitor, which you pick under **Location**. See [Authentication](https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/deep-dive/authentication/#the-user-and-the-auth-source).

#### Is the connection encrypted?

When **SSL Connection** is on, or whenever **DNS Seed List (SRV)** is set to **Yes (mongodb+srv, e.g. Atlas)**, the connection uses TLS. Without either, it is not encrypted.

#### Why is there no Catalog field?

Connectors such as Athena ask for a **Catalog**, the level above the database. MongoDB has no such level, only databases and collections, so there is nothing to name. Qualytics works one out from the connection settings.

---

## What it reads

#### What becomes a container?

Every collection in the selected database, including time-series collections. Views and `system.` collections are not listed. See [What becomes a container](https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/deep-dive/introduction/#what-becomes-a-container).

#### How does Qualytics know the fields of a collection?

Each Sync samples up to 10,000 documents per collection and builds the fields from them. A smaller collection is read in full. The fields stay as they are until the next Sync. See [How fields are worked out](https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/deep-dive/introduction/#how-fields-are-worked-out).

#### Can I change the sample size?

No. The sample is always up to 10,000 documents per collection. Running a Sync again draws a new sample and updates the fields.

#### What happens to nested documents and arrays?

Sub-documents become nested fields and arrays become array fields, which you can profile and check. A sub-document with more than 20 different keys is read as a map. See [Complex Data Types](https://userguide.qualytics.io/container/complex-data-types/).

#### What if documents store the same field with different types?

Each field takes the type the sample settled on. A value of another type is converted where possible, such as the text `"12"` in a number field, and otherwise reads as empty for that document only. The rest of the document is still read.

#### Can Qualytics write to my MongoDB database?

No. The connector is read-only, so it cannot be used as an enrichment datastore. Link a separate enrichment datastore as its destination for the anomalies and metadata Qualytics produces.

#### Can I query a collection with SQL?

Yes, through a [Computed Table](https://userguide.qualytics.io/container/computed-tables/getting-started/). Its query is written in Spark SQL, not in the MongoDB query language or as an aggregation pipeline, and Qualytics runs it on the documents it reads. Each collection is a table whose fields are the ones Sync found, so a nested field is reached with a dot, for example `address.city`. See [SQL Dialects per Connector](https://userguide.qualytics.io/container/computed-tables/deep-dive/sql-dialects/#native-connectors).

---

## Datastores

#### Can I monitor several databases from one connection?

Yes. Select several databases in the **Database** dropdown, and each one becomes its own datastore on the same connection. Add more later with [Add with an Existing Connection](https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/how-tos/add-existing-connection/).

#### What happens when I change the password?

Edit the connection, enter the new password, and save. The change applies to every datastore that uses that connection. See [How the credentials are stored](https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/deep-dive/authentication/#how-the-credentials-are-stored).

**Still have questions?**
Contact the Qualytics support team at
[support@qualytics.ai](mailto:support@qualytics.ai).

*Last updated: November 9, 2026.*
