tMongoDBRow Standard properties - Cloud - 8.0

MongoDB

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > NoSQL components > MongoDB components
Data Quality and Preparation > Third-party systems > NoSQL components > MongoDB components
Design and Development > Third-party systems > NoSQL components > MongoDB components
Last publication date
2024-02-20

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

Use existing connection

Select this check box and in the Component List drop-down list, select the desired connection component to reuse the connection details you already defined.

DB Version

List of the database versions.

Available when the Use existing connection check box is not selected.

Use connection string

Select this option to establish a connection using a MongoDB Atlas URI. Enter the URI in the field to the right. See Connection String URI Format for related information.

This option is available when you select MongoDB 4.4.X and later from the DB Version drop-down list.

Note: 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 address table.

In the Replica address table, you can define multiple MongoDB database servers for failover.

Available when the Use existing connection check box is not selected.

Server and Port

Address and listening port of the database server.

Available when the Use existing connection or Use replica set address check box is not selected.

Database

Name of the database.

Use SSL connection (Configure the SSL authentication in tSetKeystore or in Studio preferences)

Select this check box to enable the SSL or TLS encrypted connection.

Then you need to use the tSetKeystore component in the same Job to specify the encryption information.

Note that the SSL connection is available only for the version 2.4 + of MongoDB.

Required authentication

Select this check box to enable the database authentication.

Among the mechanisms listed on the Authentication mechanism drop-down list, the NEGOTIATE one is recommended if you are not using Kerberos, because it automatically select the authentication mechanism the most adapted to the MongoDB version you are using.

Because the SCRAM-SHA-256 authentication mechanism is only supported by MongoDB 4.x and later versions, SCRAM-SHA-256 SASL option is available only when MongoDB 4.4.X and later is selected from the DB Version drop-down list.

Note: The X509 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.

For details about the other mechanisms in this list, see MongoDB Authentication from the MongoDB documentation.

Set Authentication database

If the username to be used to connect to MongoDB has been created in a specific Authentication database of MongoDB, select this check box to enter the name of this Authentication database in the Authentication database field that is displayed.

For further information about the MongoDB Authentication database, see User Authentication database.

Username and Password

DB user authentication data.

To enter the password, click the [...] button next to the password field, enter the password in double quotes in the pop-up dialog box, and click OK to save the settings.

Available when the Required authentication check box is selected.

If the security system you have selected from the Authentication mechanism drop-down list is Kerberos, you need to enter the User principal, the Realm and the KDC server fields instead of the Username and the Password fields.

Schema and Edit Schema

A schema is a row description. It defines the number of fields (columns) to be processed and passed on to the next component. When you create a Spark Job, avoid the reserved word line when naming the fields.

Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion.

    If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the Repository Content window.

Click Sync columns to retrieve the schema from the previous component connected in the Job.

Execute command

Select this check box to enter MongoDB commands in the Command field for execution.

  • Command: in this field, enter the command to be executed, if this command contains one single variable.

    For example, if you need to construct the command
    {"isMaster": 1}
    You need simply enter isMaster within quotation marks.
  • Construct command from keys and values: if the command to be executed contains multiple variables, select this check box and in the Command keys and values table, add the variables and their respective values to be used.

    For example, if you need to construct the following command
    { renameCollection : "<source_namespace>" , to : "<target_namespace>" , dropTarget : < true | false > }
    You need to add three rows to the Command keys and values table and enter one variable-value pair to each row within quotation marks:
    "renameCollection"      "old_name"
    "to"                    "new_name"
    "dropTarget"            "false"
  • Construct command from a JSON string: if you want to directly enter the command to be used, select this check box and enter this command in the JSON string command field that is displayed. Only one command is allowed per tMongoDBRow.

    For example:
    "{createIndexes: 'restaurants', indexes : [{key : {restaurant_id: 1}, name: 'id_index_2', unique: true}]}"

    Note that you must use single quotation marks to surround the string values used in the command and double quotation marks to surround the command itself.

    For further information about the MongoDB commands you can use in this field, see https://docs.mongodb.org/manual/reference/command/.

Function

Enter MongoDB functions in the Function field for execution.

Not available when the Execute command check box is selected.

Parameters value

Click the [+] button to add lines as needed and then define the parameter values in the form of variables or constant values, for example row1.author or "Andy". Note that the parameter values correspond to the parameters defined in the Function field, in the same order.

Not available when the Execute command check box is selected.

Die on error

This check box is cleared by default, meaning to skip the row on error and to complete the process for error-free rows.

Advanced settings

tStatCatcher Statistics

Select this check box to collect the log data at the component level.

Global Variables

Global Variables

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

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

For more information about variables, see Using contexts and variables.

Usage

Usage rule

tMongoDBRow allows you to manipulate the MongoDB database through the MongoDB commands and functions.