# tAmazonDocumentDBInput

Retrieves records from a collection in the Amazon DocumentDB database and transfers them to the following component for display or storage.

tAmazonDocumentDBInput retrieves certain documents from an Amazon DocumentDB database collection by supplying a query document containing the fields the desired documents should match.

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).

## tAmazonDocumentDBInput Standard properties

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

The Standard tAmazonDocumentDBInput component belongs to the Cloud family.

Talend Studio is compatible with Amazon DocumentDB 3.6 version.

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

Information noteNote: This component is available only when you have installed the 8.0.1-R2022-02 Talend Studio Monthly update or a later one delivered by Talend.

## Basic settings

| Properties | Description |
| --- | --- |
| Property Type | Select the way the connection details<br>will be set.<br><br><ul> <li> <p> <span>Built-In</span>: The connection details will be set                                locally for this component. You need to specify the values for all                                related connection properties manually.</p> </li> <li> <p> <span>Repository</span>: The connection details stored                                centrally in <span><span>Repository</span><abbr> &gt; </abbr><span>Metadata</span></span> will be reused by this component. </p> <p>You need to click                                the <span>[...]</span> button next to it and in the pop-up                                    <span>Repository Content</span> dialog box, select the                                connection details to be reused, and all related connection                                properties will be automatically filled in.</p> </li> </ul> |
| Use an 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. |
| Schema and Edit Schema | A schema is a row description, and it defines the fields to be processed and<br>passed on to the next component.<br><br><ul> <li> <p> <span>Built-In</span>: You create and store the schema locally for this component                only.</p> </li> <li> <p> <span>Repository</span>: You have already created the schema and stored it in the                Repository. You can reuse it in various projects and Job designs.</p> </li> </ul><br><br>Click Edit schema to make changes to<br>the schema. If you make changes, the schema automatically becomes built-in.<br><br>Click Guess schema<br>to retrieve the table schema. |
| Address type | Select the address type from the drop-down list:<br><br><ul> <li> <span>Standalone</span>: Define the standalone Amazon DocumentDB                        database server you want to connect to.</li> <li> <span>Replica set</span>: Define a set of multiple Amazon                        DocumentDB database servers you want to connect to in the                           <span>ReplicaSet address</span> table.</li> </ul> |
| Host and Port | Enter the IP address and listening port of the database server. |
| Database | Enter the name of the Amazon DocumentDB database. |
| Need auth | Select this check box to enable the database authentication.<br><br>Among the mechanisms listed on the Auth mechanism<br>drop-down list, select either Negotiate,<br>which is recommended because it automatically select the most adapted<br>authentication mechanism, or SCRAM-SHA-1 SASL, or<br>SCRAM-SHA-256.<br><br>Select the Use auth<br>database check box to enter the name of the authentication<br>database in which the username to be used to connect to Amazon DocumentDB has<br>been created and enter the database user authentication data in the<br>Username and Password<br>fields.<br><br>To enter the password, click the [...] button<br>next to the Password field to bring out the Enter a new<br>password dialog box, enter the password in the text field, and click<br>OK. Note that you can enter the password either in a JSON string<br>in the pure password mode or as a Java expression in the Java<br>mode. You can toggle between the two modes by clicking switch to<br>Java mode or switch to pure password mode on the top<br>of the text field.<br><br>Information noteNote:<br><br><ul> <li>The two password modes are available only when you have installed the                  8.0.1-R2022-05 <span>Talend Studio</span>                  monthly update or a later one delivered by <span>Talend</span>. For more information, check with your administrator.</li> <li>If the 8.0.1-R2022-05 <span>Talend Studio</span>                  monthly update or a later one delivered by <span>Talend</span>                  is not installed, you can enter passwords in the <span>Java mode</span>                  only. </li> </ul> |
| Use SSL connection | Select this checkbox to enable the SSL or TLS encrypted connection.<br><br>Then you must specify the encryption information using one of these methods:<br><br><ul> <li>If you want to centralize the connection information, set up the SSL                           connection in <span><span>Windows</span><abbr> &gt; </abbr><span>Preferences</span><abbr> &gt; </abbr><span> <span>Talend</span> </span><abbr> &gt; </abbr><span>SSL</span></span> and check the <span>Enable SSL</span> field in                           the MongoDB connection configuration in                           <span>Metadata</span>.</li> <li>If you want to keep this information within the scope of this Job, use                           the <span>tSetKeystore</span> component in the same Job.</li> </ul> |
| Collection | Enter the name of the collection in the Amazon DocumentDB<br>database. |
| Use query | Select this check box to retrieve data using query statements. You can enter<br>the query statement in the Query field. |
| Mode | Select the type of target data to read between<br>JSON and Text. |

## Advanced settings

| Properties | Description |
| --- | --- |
| tStatCatcher Statistics | Select this check box to collect the log data at the component<br>level. |
| Connection parameter | Specify additional connection properties for the Amazon DocumentDB<br>connection you are creating. |

## Global Variables

| Variables | Description |
| --- | --- |
| ERROR\_MESSAGE | The error message generated by the component when an error<br>occurs. This is an After variable and it returns a string. |
| NB\_LINE | The number of rows processed. This is an After variable and<br>it returns an integer. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | As a start component, tAmazonDocumentDBInput allows you to retrieve records from a<br>collection in the Amazon DocumentDB database and transfer them to the following<br>component for display or storage. |