# tMongoDBRow

Executes the commands and functions of the MongoDB database.

This component is not shipped with your Talend Studio by default. You need to install it using the Feature Manager. For more information, see [Installing features using the Feature Manager](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/install-features-to-talend-studio).

## tMongoDBRow Standard properties

These properties are used to configure tMongoDBRow running in the Standard Job framework.

The Standard tMongoDBRow component belongs to the Big Data and the Databases NoSQL families.

The component in this framework is available in all Talend products with Big Data and in Talend Data Fabric.

## Basic settings

| Properties | Description |
| --- | --- |
| Use existing connection | Select this check box and in the Component<br>List drop-down list, select the desired connection component to<br>reuse the connection details you already defined. |
| DB Version | List of the database versions.<br><br>This option is available<br>when the Use existing connection check<br>box is not selected. |
| Use connection string | Select this option to establish a connection using a MongoDB<br>Atlas URI. Enter the URI in the field to the right. See [Connection String URI Format](https://docs.mongodb.com/manual/reference/connection-string/) for related information.<br><br>This option is available when you select MongoDB 4.4.X and<br>later from the DB Version drop-down<br>list.<br><br>Information noteNote: This option is available only when you have installed the R2021-12 Talend Studio Monthly update or a later one delivered by Talend. For more information, check with your administrator. |
| Use replica set address | Select this check box to show the Replica<br>address table.<br><br>In the Replica address table, you can define multiple MongoDB database<br>servers for failover.<br><br>This option is available when the<br>Use existing connection check box is<br>not selected. |
| Server and Port | Address and listening port of the database server.<br><br>This<br>option is available when the Use existing<br>connection or Use replica set<br>address check box is not selected. |
| Database | Name of the database. |
| Use SSL connection (Configure the SSL<br>authentication in tSetKeystore or in Studio preferences) | Select this checkbox to enable the SSL or TLS encrypted connection.<br><br>Then you need to use the tSetKeystore<br>component in the same Job to specify the encryption information.<br><br>Note that the SSL connection is available only for the version 2.4 + of<br>MongoDB. |
| Required authentication | Select this check box to enable the database authentication.<br><br>Among the mechanisms listed on the Authentication mechanism<br>drop-down list, the NEGOTIATE one is recommended if<br>you are not using Kerberos, because it automatically select the authentication mechanism<br>the most adapted to the MongoDB version you are using.<br><br>Because the SCRAM-SHA-256 authentication mechanism is only supported by<br>MongoDB 4.x and later versions, SCRAM-SHA-256 SASL option is available<br>only when MongoDB 4.4.X and later is selected from the DB<br>Version drop-down list.<br><br>Information noteNote: The X509 option is available only when you have<br>installed the R2021-12 Talend Studio Monthly update or a later one delivered by Talend. For more information, check with your administrator.<br><br>For details about the other mechanisms in this list, see [MongoDB Authentication](https://docs.mongodb.org/manual/reference/parameters/#param.authenticationMechanisms) from the MongoDB<br>documentation. |
| Set Authentication database | If the username to be used to connect to MongoDB has been created in a specific<br>Authentication database of MongoDB, select this check box to enter the name of this<br>Authentication database in the Authentication database<br>field that is displayed.<br><br>For further information about the MongoDB Authentication database, see [User Authentication database](https://docs.mongodb.org/manual/core/security-users/#user-authentication-database). |
| Username and Password | DB user authentication data.<br><br>To enter the password, click the [...] button<br>next to the password field, enter the password in double quotes in the pop-up dialog box,<br>and click OK to save the settings.<br><br>Available when the Required<br>authentication check box is selected.<br><br>If the security system you have selected from the Authentication mechanism dropdown list is Kerberos, you need to<br>enter the User principal, the Realm and the KDC<br>server fields instead of the Username and the Password<br>fields. |
| Schema and Edit Schema | A schema is a row description. It defines the number of fields<br>(columns) to be processed and passed on to the next component. When you create a Spark<br>Job, avoid the reserved word line when naming the<br>fields.<br><br>Click Edit<br>schema to make changes to the schema. If the current schema is of the Repository type, three options are available:<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul><br><br>Click Sync<br>columns to retrieve the schema from the previous component connected in the<br>Job. |
| Construct command from keys and values | Select this check box to use a MongoDB database command and enter key-value<br>pairs that will be used to construct a BSON document and be sent to the database<br>server.<br><br>For more information about MongoDB database commands, see the<br>corresponding [MongoDB documentation](https://www.mongodb.com/docs/manual/reference/method/db.runCommand/#:~:text=Definition%20db.runCommand%28command%2C%20%5Boptions%5D%29%20Provides%20a%20helper%20to%20run,a%20consistent%20interface%20between%20the%20shell%20and%20drivers). |
| Construct command from a JSON string | Select this check box to use a MongoDB database command and enter a JSON<br>string that will be converted to a BSON document and be sent to the database<br>server.<br><br>For more information about MongoDB database commands, see the<br>corresponding [MongoDB documentation](https://www.mongodb.com/docs/manual/reference/method/db.runCommand/#:~:text=Definition%20db.runCommand%28command%2C%20%5Boptions%5D%29%20Provides%20a%20helper%20to%20run,a%20consistent%20interface%20between%20the%20shell%20and%20drivers).<br><br>This<br>component supports [Atlas Vector Search](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-overview/) capabilities, you<br>can use this field to create a vector search index that can then be used in<br>[tMongoDBInput](https://help.qlik.com/talend/en-US/components/8.0/mongodb/tmongodbinput-standard-properties). The [command syntax](https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/) to create a search<br>index<br>is:<br><br>```<br>"{createSearchIndexes: '<collection name>', indexes: [{name: '<index_name>',type: 'vectorSearch', definition:<br>{fields: [{type: 'vector', path: '<field_to_index>',numDimensions: <number_of_vector_dimensions>, similarity: '<vector_similarity_function>'}]}}]}"<br>```<br><br>For<br>more information on the index configuration, see [the corresponding MongoDB<br>documentation](https://www.mongodb.com/docs/compass/current/indexes/create-vector-search-index/#provide-the-atlas-vector-search-index-configurations). |
| Die on error | This check box is cleared by default, meaning to skip the row on error and<br>to complete the process for error-free rows. |

## Advanced settings

| Properties | Description |
| --- | --- |
| tStatCatcher Statistics | Select this check box to collect the log data at the component<br>level. |

## Global Variables

| Variables | Description |
| --- | --- |
| Global Variables | ERROR\_MESSAGE: the error message generated by the<br>component when an error occurs. This is an After variable and it returns a string. This<br>variable functions only if the Die on error checkbox is<br>cleared, if the component has this checkbox.<br><br>A Flow variable functions during the execution of a component<br>while an After variable functions after the execution of the component.<br><br>To fill up a field or expression with a variable, press Ctrl+Space to access the variable list and choose the variable to use from<br>it.<br><br>For more information about variables, see [Using contexts and variables](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/contexts-and-variables). |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | tMongoDBRow allows you to manipulate<br>the MongoDB database through the MongoDB commands and functions. |

**Related concepts**

* [Using MongoDB functions to create a collection and write data to it](https://help.qlik.com/talend/en-US/components/8.0/mongodb/tmongodbinput-tmongodbrow-tlogrow-using-mongodb-functions-to-create-collection-and-write-data-to-it-standard-component-bigdata-this)