Any reason not to simply pass these parameters into the DoFn constructor?

On Mon, Mar 1, 2021 at 3:42 PM Xinyu Liu <xinyuliu...@gmail.com> wrote:

> Hi, all,
>
> Currently the @Setup method signature in DoFn does not support any
> arguments. This is a bit cumbersome to use for use cases such as creating a
> db connection, rest client or fetch some resources, where we would like to
> read the configs from the PipelineOptions during setup. Shall we support
> adding a DoFn SetupContext that can let the users specify the
> PipelineOptions in the arguments, similar to @StartBundle? Seems the
> PipelineOptions should always be available when the DoFnRunner is created.
> Anyone seeing the downside of it?
>
> Thanks,
> Xinyu
>

Reply via email to