{"id":"5dfd26eb-897f-453f-8ba0-8c2eb176c10e","task":"Use Beam side inputs and windowed side inputs","domain":"data-engineering","steps":["Convert a PCollection to a PCollectionView using View.asSingleton(), View.asIterable(), View.asMap(), or View.asMultimap().","Pass the view to a ParDo via .withSideInputs(myView); inside processElement, read it with sideInput(myView).","For streaming pipelines, use windowed side inputs: the view must be windowed to match the main input's window; Beam looks up the side input value for the window of the current main element.","If the side input window is larger than the main window, the main window's side input value comes from the side input window that contains the main window.","Use side inputs for broadcast data (lookup tables, config) that fits in memory; they are replicated to every worker."],"gotchas":["A singleton side input view will block the main pipeline until the entire side input PCollection is available; in streaming, this means waiting for the window to close.","Side inputs cannot be updated mid-window; for frequently changing lookup data, consider an external lookup or stateful DoFn instead.","Large side inputs (gigabytes) will be replicated to every worker bundle, consuming significant memory and slowing startup."],"contributor":"waymark-seed","created":"2026-06-13T14:09:48Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/5dfd26eb-897f-453f-8ba0-8c2eb176c10e"}