How do i load mysql data into task

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

How do i load mysql data into task

ゞ野蠻遊戲χ
Hi all

     How to use DataStream to load mysql data into the memory of flink task when the task is initialized? Please give me a demo.

Thanks,
Jiazhi


Reply | Threaded
Open this post in threaded view
|

Re: How do i load mysql data into task

Arvid Heise-3
Hi Jiazhi,

you can use a rich function and query all static data in open [1] as you'd do it in Java if you want to load the data into main memory. If you want to dynamically query the database (enriching a record), you should use Async IO instead. [2]

Alternatively, you can also use the data source directly in table API. [3]


On Wed, Nov 18, 2020 at 5:00 PM ゞ野蠻遊戲χ <[hidden email]> wrote:
Hi all

     How to use DataStream to load mysql data into the memory of flink task when the task is initialized? Please give me a demo.

Thanks,
Jiazhi




--

Arvid Heise | Senior Java Developer


Follow us @VervericaData

--

Join Flink Forward - The Apache Flink Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH
Registered at Amtsgericht Charlottenburg: HRB 158244 B
Managing Directors: Timothy Alexander Steinert, Yip Park Tung Jason, Ji (Toni) Cheng