You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Marke Builder <ma...@gmail.com> on 2018/11/09 16:22:44 UTC

DataStream with one DataSource and two different Sinks with diff. schema.

Hi,

what is the recommended way to implement the following use-case for
DataStream:
One data sink, same map() functions for parsing and normalization and
different map() function for format and two different sinks for the output?

The (same)data must be stored in both sinks.
And I prefere one job (related to the same source and map functions)

How I can/should use the split() function for this use-case?

Thanks!

Re: DataStream with one DataSource and two different Sinks with diff. schema.

Posted by Hequn Cheng <ch...@gmail.com>.
Hi Marke,

You can use split() and select() as is shown here[1].

Best, Hequn
[1]
https://ci.apache.org/projects/flink/flink-docs-master/dev/stream/operators/#datastream-transformations


On Sat, Nov 10, 2018 at 12:23 AM Marke Builder <ma...@gmail.com>
wrote:

> Hi,
>
> what is the recommended way to implement the following use-case for
> DataStream:
> One data sink, same map() functions for parsing and normalization and
> different map() function for format and two different sinks for the output?
>
> The (same)data must be stored in both sinks.
> And I prefere one job (related to the same source and map functions)
>
> How I can/should use the split() function for this use-case?
>
> Thanks!
>