The code starts like this:
return pcol.apply(ParDo.named("FindTheBug")
.withSideInputs(foo)
.withSideInputs(bar(
.of(new DoFn<T, U>() {
F myFoo = c.sideInput(foo);
B myBar = c.sideInput(bar);
These side inputs are declared, why doesn't Dataflow see them?
It turns out that calling withSideInputs more than once is not allowed. The code should instead look like this:
return pcol.apply(ParDo.named("FindTheBug")
.withSideInputs(foo, bar)
.of(new DoFn<T, U>() {
// now you can access both side inputs
The hint is that the function's called "withSideInputs", not "withSideInput". This tripped me more than once and isn't googleable, so I thought I'd write it down in case someone else runs into this!
Also, this error happen when one forgot to call withSideInputs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With