beam-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenneth Knowles <...@google.com>
Subject Re: Documentation: Side Input and Outputs
Date Fri, 17 Feb 2017 23:15:34 GMT
Hi Tobias,

On Fri, Feb 17, 2017 at 7:51 AM, Tobias Feldhaus <
Tobias.Feldhaus@localsearch.ch> wrote:

> It seems like the documentation [0] about side in- and outputs has missed
> some
> refactoring of the code. I can’t find Max.MaxIntFn() for example, but
> there is a
> new Max.ofIntegers() method that looks like it matches it.
>

You have it correct.

I would love to improve the documentation via a pull-request, but I don’t
> understand this concept well enough to feel confident doing so, yet.
>

We love documentation-improving pull requests!

My intention is to get a
>
>         PCollectionView<Long> numOfDays
>
> Which holds the number of elements (days) of a given PCollection<DateTime>
> dates,
> and building it via a sum of counts (as a SingletonView).
>
> Something that corresponds in my head to *wrong*:
>
>         dates.apply("Count", Count.globally().asSingletonView());
>

Seems about right.


> Is it possible to access the side input outside of a DoFn?
>

You can access a side input from a DoFn and now also from a
CombineFnWithContext (a bit of an advanced feature).

Kenn

Mime
View raw message