Hello Everyone, Apache Beam allows conditional branching during pipeline construction time, but I have to decide whether to execute DoFn A or DoFn B during run time (based upon a PCollection flag).
My DoFns A and B are inside a custom transformation class and I am passing my flag as PCollectionView to the transformation class. However, Beam does not wait for the actual value of the PCollectionView and decides which DoFn to call during DAG preparation itself (always goes to else part) class CustomTx { public CustomTx(flag) { this.flag = flag; } public expand { if (flag) DoFn A else DoFn B } } class DoFn A { } class DoFn B { } If I have a DoFn inside my transformation's expand method and pass the flag as side input it gives the correct value but then, I cannot call a DoFn inside a DoFn. Appreciate any pointers on the best way to approach this branching case. -- Thanks, Praveen K Viswanathan