flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Hueske <fhue...@gmail.com>
Subject Re: Left outer join
Date Tue, 08 Nov 2016 22:17:34 GMT
This should work as well:

input
.leftOuterJoin(metrics)
.where("*")
.equalTo(0) {
     (left,right)  =>     ...
}

2016-11-08 23:10 GMT+01:00 Till Rohrmann <trohrmann@apache.org>:

> Hi Thomas,
>
> either you map your input data set into a tuple input.map(x => Tuple1(x))
> or you specify a key selector leftOuterJoin(metrics).where(x =>
> x).equalTo(0).
>
> I think the user ML user@flink.apache.org would be a better place to ask
> Flink usage related questions. The dev ML is mainly used for technical
> discussions.
>
> Cheers,
> Till
> ‚Äč
>
> On Tue, Nov 8, 2016 at 10:58 PM, Thomas FOURNIER <
> thomasfournier314@gmail.com> wrote:
>
> > Hello, I'm facing an issue with leftOuterJoin:
> >
> > - input is a DataSet[String]
> > - metrics is a DataSet[(String,Long)]
> >
> > I'm doing a leftOuterJoin like this:
> >
> > input
> > .leftOuterJoin(metrics)
> > .where(0)
> > .equalTo(0) {
> >      (left,right)  =>     ...
> > }
> >
> >
> > But I encounter the following error:
> > Specifying keys via field positions is only valid for tuple data types.
> > Type: String
> >
> > What is the correct way to handle this case (where left member has only
> one
> > field ?)
> >
> > Thanks
> > Regards
> >
> > Thomas
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message