tMongoDBConfiguration
Stores connection information and credentials to be reused by other MongoDB
components.
You configure the connection to a MongoDB database in tMongoDBConfiguration and configure the other
MongoDB components to reuse this configuration. At runtime, the Spark
executors read this configuration in order to connect to MongoDB.
Depending on the Talend
product you are using, this component can be used in one, some or all of the following
Job frameworks:
-
Spark Batch: see tMongoDBConfiguration properties for Apache Spark Batch.
The component in this framework is available in all subscription-based Talend products with Big Data
and Talend Data Fabric. -
Spark Streaming: see tMongoDBConfiguration properties for Apache Spark Streaming.
This component is available in Talend Real Time Big Data Platform and Talend Data Fabric.
tMongoDBConfiguration properties for Apache Spark Batch
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 subscription-based 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 |
||
DB Version |
Select the version of the MongDB database you need to connect to. |
||
Use replica set address or multiple query |
Select this check box to show the Server In the Server addresses |
||
Server and Port |
Enter the IP address and listening port of the database Available when the Use replica set |
||
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 In addition, set the spark.executor.extraJavaOptions
property in the Advanced properties table in the Spark configuration tab of the Run view. For example:
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 |
||
Use authentication |
If the MongoDB database to be used requires authentication, select this check box Among the mechanisms listed on the Authentication mechanism For details about the other mechanisms in this list, see MongoDB Authentication from the MongoDB |
||
Set Authentication database |
If the username to be used to connect to MongoDB has been created in a specific 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 Available when the Use authentication If the security system you have selected from the Authentication mechanism drop-down list is Kerberos, you need to |
Advanced settings
Connection string options |
You can define more properties in this table for the connection to MongoDB, For example, you can add the following option to specify a timeout value
for this connection.
For further information about the options you can add in this table, see |
Usage
Usage rule |
This component is used with no need to be connected to other The configuration in a tMongoDBConfiguration component applies only on the MongoDB related This component, along with the Spark Batch component Palette it belongs to, Note that in this documentation, unless otherwise explicitly stated, a |
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:
This connection is effective on a per-Job basis. |
Related scenarios
For a scenario in which tMongoDBConfiguration is used,
see Writing and reading data from MongoDB using a Spark Batch Job.
tMongoDBConfiguration properties for Apache Spark Streaming
These properties are used to configure tMongoDBConfiguration running in the Spark Streaming Job framework.
The Spark Streaming
tMongoDBConfiguration component belongs to belongs to the Databases and Databases NoSQL families.
This component is available in Talend Real Time Big Data Platform 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 |
||
DB Version |
Select the version of the MongDB database you need to connect to. |
||
Use replica set address or multiple query |
Select this check box to show the Server In the Server addresses |
||
Server and Port |
Enter the IP address and listening port of the database Available when the Use replica set |
||
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 In addition, set the spark.executor.extraJavaOptions
property in the Advanced properties table in the Spark configuration tab of the Run view. For example:
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 |
||
Use authentication |
If the MongoDB database to be used requires authentication, select this check box Among the mechanisms listed on the Authentication mechanism For details about the other mechanisms in this list, see MongoDB Authentication from the MongoDB |
||
Set Authentication database |
If the username to be used to connect to MongoDB has been created in a specific 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 Available when the Use authentication If the security system you have selected from the Authentication mechanism drop-down list is Kerberos, you need to |
Advanced settings
Connection string options |
You can define more properties in this table for the connection to MongoDB, For example, you can add the following option to specify a timeout value
for this connection.
For further information about the options you can add in this table, see |
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 This component, along with the Spark Streaming component Palette it belongs to, appears Note that in this documentation, unless otherwise explicitly stated, a scenario presents |
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:
This connection is effective on a per-Job basis. |
Related scenarios
For a scenario in which tMongoDBConfiguration is used,
see Reading and writing data in MongoDB using a Spark Streaming Job.