tMongoDBConfiguration properties for Apache Spark Batch - 7.3

MongoDB

Version
7.3
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-21

These properties are used to configure tMongoDBConfiguration running in the Spark Batch Job framework.

The Spark Batch tMongoDBConfiguration component belongs to the Databases and Databases NoSQL families.

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

Basic settings

Property type

Either Built-In or Repository.

Built-In: No property data stored centrally.

Repository: Select the repository file where the properties are stored.

DB Version

Select the version of the MongDB database you need to connect to.

Use replica set address or multiple query routers

Select this check box to show the Server addresses table.

In the Server addresses table, define the sharded MongoDB databases or the MongoDB replica sets you want to connect to.

Server and Port

Enter the IP address and listening port of the database server.

Available when the Use replica set address or multiple query routers check box is not selected.

Database

Enter the name of the MongoDB database to be connected to.

Use SSL connection

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.

In addition, set the spark.executor.extraJavaOptions property in the Advanced properties table in the Spark configuration tab of the Run view. For example:
"spark.executor.extraJavaOptions" :
"-Djavax.net.ssl.trustStorePassword
=password 
-Djavax.net.ssl.trustStore=
/tmp/keystore.jks 
-Djavax.net.ssl.trustStoreType=JKS"
This property sets the same parameters as tSetKeystore does for the Spark executors, so you can copy the values from tSetKeystore. Furthermore, you must deploy the keystore on all worker nodes at the exact same location. In the example above, it is /tmp/keystore.jks.

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

Use authentication

If the MongoDB database to be used requires 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.

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, and then in the pop-up dialog box enter the password between double quotes and click OK to save the settings.

Available when the Use 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.

Advanced settings

Connection string options

You can define more properties in this table for the connection to MongoDB, in addition to the properties defined in the Basic settings tab.

For example, you can add the following option to specify a timeout value for this connection.
connectTimeoutMS=300000

For further information about the options you can add in this table, see Connection options.

Usage

Usage rule

This component is used with no need to be connected to other components.

The configuration in a tMongoDBConfiguration component applies only on the MongoDB related components in the same Job. In other words, the MongoDB components used in a child or a parent Job that is called via tRunJob cannot reuse this configuration.

This component, along with the Spark Batch component Palette it belongs to, appears only when you are creating a Spark Batch Job.

Note that in this documentation, unless otherwise explicitly stated, a scenario presents only Standard Jobs, that is to say traditional Talend data integration Jobs.

Spark Connection

In the Spark Configuration tab in the Run view, define the connection to a given Spark cluster for the whole Job. In addition, since the Job expects its dependent jar files for execution, you must specify the directory in the file system to which these jar files are transferred so that Spark can access these files:
  • Yarn mode (Yarn client or Yarn cluster):
    • When using Google Dataproc, specify a bucket in the Google Storage staging bucket field in the Spark configuration tab.

    • When using HDInsight, specify the blob to be used for Job deployment in the Windows Azure Storage configuration area in the Spark configuration tab.

    • When using Altus, specify the S3 bucket or the Azure Data Lake Storage for Job deployment in the Spark configuration tab.
    • When using Qubole, add a tS3Configuration to your Job to write your actual business data in the S3 system with Qubole. Without tS3Configuration, this business data is written in the Qubole HDFS system and destroyed once you shut down your cluster.
    • When using on-premises distributions, use the configuration component corresponding to the file system your cluster is using. Typically, this system is HDFS and so use tHDFSConfiguration.

  • Standalone mode: use the configuration component corresponding to the file system your cluster is using, such as tHDFSConfiguration Apache Spark Batch or tS3Configuration Apache Spark Batch.

    If you are using Databricks without any configuration component present in your Job, your business data is written directly in DBFS (Databricks Filesystem).

This connection is effective on a per-Job basis.