Data Stream Enrichement

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Data Stream Enrichement

Aissa Elaffani
Hello Guys,
I want to enrich a data stream with some mongoDB data, and I am willing to use the RichFlatMapFunction, and I am lost , i don't know where to configure the connection with my MongoDB. Can anyone Help me in this ? 
Best,
Aissa

Reply | Threaded
Open this post in threaded view
|

Re: Data Stream Enrichement

taher koitawala-2
The Open method would be a great! And close method could close it when operator closes! 

Also for external calls AsyncIO is a great operator. Give that a look.


Regards,
Taher Koitawala

On Sat, May 30, 2020, 10:17 PM Aissa Elaffani <[hidden email]> wrote:
Hello Guys,
I want to enrich a data stream with some mongoDB data, and I am willing to use the RichFlatMapFunction, and I am lost , i don't know where to configure the connection with my MongoDB. Can anyone Help me in this ? 
Best,
Aissa

Reply | Threaded
Open this post in threaded view
|

Re: Data Stream Enrichement

Lasse Nedergaard-2
Hi. 
If you can cache the data i state it’s the preferred way. Then you read all you values from a store do a key by and store them in state in a coprocessfunction. If you need to do a lookup for every row you have to use the AsyncIO function

Med venlig hilsen / Best regards
Lasse Nedergaard


Den 30. maj 2020 kl. 18.49 skrev Taher Koitawala <[hidden email]>:


The Open method would be a great! And close method could close it when operator closes! 

Also for external calls AsyncIO is a great operator. Give that a look.


Regards,
Taher Koitawala

On Sat, May 30, 2020, 10:17 PM Aissa Elaffani <[hidden email]> wrote:
Hello Guys,
I want to enrich a data stream with some mongoDB data, and I am willing to use the RichFlatMapFunction, and I am lost , i don't know where to configure the connection with my MongoDB. Can anyone Help me in this ? 
Best,
Aissa