August 16, 2023

Reading and writing data in MongoDB using a Spark Streaming Job – Docs for ESB 6.x

Reading and writing data in MongoDB using a Spark Streaming Job

This scenario applies only to Talend Real-time Big Data Platform or Talend Data Fabric.

In this scenario, you create a Spark Streaming Job to extract data about given movie
directors from MongoDB, use this data to filter and complete movie information and then
write the result into a MongoDB collection.

use_case-mongodblookupinput-spark_stream1.png
The sample data about movie directors reads as
follows:

This data contains the names of these directors and the ID numbers distributed to
them.

The structure of this data in MongoDB reads as
follows:

Note that the sample data is created for demonstration purposes only.

Prerequisites:

  • The Spark cluster and the MongoDB database to be used have been properly
    installed and are running.

  • The above-mentioned data has been loaded in the MongoDB collection to be
    used.

To replicate this scenario, proceed as follows:


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x