tMongoDBOutput properties for Apache Spark Streaming
These properties are used to configure tMongoDBOutput running in the Spark Streaming Job framework.
The Spark Streaming tMongoDBOutput component belongs to the Databases family.
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 properties are stored. |
MongoDB configuration |
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. |
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:
If a column in the database is a JSON document and you need to read the entire document, put an asterisk (*) in the DB column column, without quotation marks around. |
Collection |
Enter the name of the collection to be used. A MongoDB collection is the equivalent of an RDBMS table and contains documents. |
Set write concern |
Select this check box to set the level of acknowledgement requested from for write operations. Then you need to select the level of this operation. For further information, see the related MongoDB documentation on http://docs.mongodb.org/manual/core/write-concern/. |
Action on data |
The following operations are available:
|
Mapping |
Each column of the schema defined for this component represents a field of the documents to be read. In this table, you need to specify the parent nodes of these fields, if any. For example, in the document reading as
follows
{ _id: ObjectId("5099803df3f4948bd2f98391"), person: { first: "Joe", last: "Walker" } }The first and the last fields have person as their parent node but the _id field does not have any parent node. So once completed, this Mapping table should read as follows: Column Parent node path _id first "person" last "person" |
Advanced settings
Advanced Hadoop MongoDB properties |
Add properties to define extra operations you need tMongoDBOutput to perform when writing data. The available properties are listed and explained in MongoDB Connector for Hadoop. |
Usage
Usage rule |
This component is used as an end component and requires an input link. This component should use a tMongoDBConfiguration component present in the same Job to connect to a MongoDB database. You need to drop a tMongoDBConfiguration component alongside this component and configure the Basic settings of this component to use tMongoDBConfiguration. This component, along with the Spark Streaming component Palette it belongs to, appears only when you are creating a Spark Streaming 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:
This connection is effective on a per-Job basis. |