# MongoDB Connection

## MongoDB Connection

### Description

<img src="/files/AmKVKDBoYaZJNXhgcOza" alt="MongoDB Leaf FullColor RGB" data-size="line">

Describes a MongoDB connection.

The MongoDB connection, specified on a project level, can be reused across multiple (instances of) a transform or other plugin types.

### Related Plugins

* [MongoDB Input](/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/mongodbinput.md)
* [MongoDB Output](/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/mongodboutput.md)

### Options

| Option                               | Default   | Description                                                             |
| ------------------------------------ | --------- | ----------------------------------------------------------------------- |
| MongoDB Connection name              |           | The name to use for this connection                                     |
| Hostname                             | localhost | cluster hostname                                                        |
| Port                                 | 27017     | the port for the MongoDB Database                                       |
| Database name                        |           |                                                                         |
| Authentication database              |           |                                                                         |
| Username                             |           |                                                                         |
| Password                             |           |                                                                         |
| Authentication mechanism             | PLAIN     | SCRAM\_SHA1, MONGODB\_CR or PLAIN                                       |
| User Kerberos                        | false     |                                                                         |
| Connection timeout (ms)              |           |                                                                         |
| Socket timeout (ms)                  |           |                                                                         |
| Read preference                      | PRIMARY   | PRIMARY, PRIMARY\_PREFERRED, SECONDARY, SECONDARY\_PREFERRED or NEAREST |
| Use all replica set members?         | false     |                                                                         |
| Specify the read preference tag sets |           |                                                                         |
| Use an SSL socket factory?           | false     |                                                                         |
| Write concern                        |           |                                                                         |
| Replication timeout (ms)             |           |                                                                         |
| Journaled?                           | true      |                                                                         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/index-2/mongodb-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
