apache/beam · error · IllegalArgumentException
calling getSideInput() with unknown view
Error message
calling getSideInput() with unknown view
What it means
In SplittableParDoNaiveBounded's translated wrapper DoFn (a naive BoundedSource-based expansion of splittable DoFns), sideInput(tagId) looks up the runner-supplied tag id in sideInputMapping and throws IllegalArgumentException 'calling getSideInput() with unknown view' when not found. As with SplittableParDo, this means the DoFn attempted to read a side input that was not declared on the transform.
Source
Thrown at sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/SplittableParDoNaiveBounded.java:236
public PipelineOptions pipelineOptions() {
return c.getPipelineOptions();
}
@Override
public PaneInfo paneInfo(DoFn<InputT, OutputT> doFn) {
return c.pane();
}
@Override
public BoundedWindow window() {
return w;
}
@Override
public Object sideInput(String tagId) {
PCollectionView<?> view = sideInputMapping.get(tagId);
if (view == null) {
throw new IllegalArgumentException(
"calling getSideInput() with unknown view");
}
return c.sideInput(view);
}
@Override
public String getErrorContext() {
return NaiveProcessFn.class.getSimpleName()
+ ".invokeGetInitialWatermarkEstimatorState";
}
});
RestrictionT restriction = c.element().getValue();
WatermarkEstimatorStateT watermarkEstimatorState = initialWatermarkEstimatorState;
while (true) {
RestrictionT currentRestriction = restriction;
WatermarkEstimatorStateT currentWatermarkEstimatorState = watermarkEstimatorState;
View on GitHub (pinned to 12126d8942)
Solutions
- Declare the view: .withSideInputs(...) on the SplittableParDo/ParDo transform.
- Audit the DoFn's c.sideInput() calls against the transform's declared side inputs.
- If the naive fallback is the trigger, check whether the runner can use the standard SplittableParDo translation instead.
Example fix
// before items.apply(SplittableParDo.of(pardo)); // pardo lacks withSideInputs(mapView) // after items.apply(SplittableParDo.of(pardo.withSideInputs(mapView)));
Defensive patterns
Strategy: validation
Validate before calling
for (PCollectionView<?> v : accessedViews(fn)) { if (!pardo.getSideInputs().containsKey(v.getTagInternal())) throw new IllegalStateException("Undeclared side input"); } Try / catch
try { return c.sideInput(view); } catch (IllegalArgumentException e) { throw new IllegalStateException("Declare view via withSideInputs()", e); } Prevention
- Keep withSideInputs() and DoFn accesses in sync
- Add a test that runs the DoFn on a runner exercising the naive path
- Check TupleTag identity across refactors
When it happens
Trigger: A wrapped splittable DoFn's processing callback calls c.sideInput(view) where view's TupleTag is missing from sideInputMapping — i.e. the view was not among the transform's declared side inputs when the naive bounded translation built the mapping.
Common situations: Legacy runners using the naive bounded fallback for SplittableParDo with DoFns that read undeclared side inputs, or code refactored to drop a withSideInputs() declaration while the DoFn still accesses the view.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- calling getSideInput() with unknown view
- %s.getSideInputWindow() should never be called. It is a priv
- Cannot access sideInput in non-window observing context.
- Unsupported window mapping fn: ${sideInput.windowMappingFn.u
- Illegal access to pipeline after visitor traversal was compl
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/1b913cbec7327327.
Report an issue: GitHub.