Yep, that is mostly it. I have (DataStream) connector (sources & sink) which works for a fixed type (`JsonNode` for what it's worth) as you say and I want to reuse it for Table/SQL, which requires working with `DataRow` as the underlying data type. But even beyond that specific use case, I think being able of genering sinks/sources out of existing ones makes sense. Essentially, what I'd like is to make sources & sinks functorial by attaching a `map` method, but maybe I should not even need this in the first place and there are more idiomatic/correct ways of approaching this within Flink.
On Mon, Jul 18, 2022 at 5:33 PM Alexander Fedulov <alexan...@ververica.com> wrote: > Hi Salva, > > what is the goal? Do you have some source that already has a fixed type > and you want to reuse its functionality for producing a different data type? > > Best, > Alexander Fedulov > > > On Mon, Jul 18, 2022 at 1:29 PM Salva Alcántara <salcantara...@gmail.com> > wrote: > >> If I have a Source<A> (Sink<A>), what would be the simplest way of >> obtaining a Source<B> (Sink<B>) based on a mapping/conversion function from >> A to B. AFAIK sources & sinks don't have map so I was just wondering how to >> approach this in the context of new sources/sinks apis. >> >> Regards, >> >> Salva >> >