Using side outputs
As the name suggests, side inputs are something that is added to the main input from the side, while side outputs are something that is output from the DoFn
object outside of the main PCollection
output. Let's start with the side outputs, as they are more straightforward.