apache/beam · error · java.lang.IllegalArgumentException
is missing expected tag
Error message
%s %s is missing expected tag: %s
What it means
SingleStoreSchemaTransformWriteProvider expects exactly one input PCollectionRow under INPUT_TAG. expand() throws IllegalArgumentException when the input tuple does not contain that tag, so rows to write cannot be located.
Solutions
- Wrap the input PCollection<Row> with the exact tag: PCollectionRowTuple.of(SingleStoreSchemaTransformWriteProvider.INPUT_TAG, rows).
- Import/reference the provider's INPUT_TAG constant instead of a hardcoded string.
- Verify the transform receives a single PCollectionRow, not multiple tags.
Example fix
// before
PCollectionRowTuple.of("rows", rowPc).apply(writeTransform)
// after
PCollectionRowTuple.of(SingleStoreSchemaTransformWriteProvider.INPUT_TAG, rowPc).apply(writeTransform) Defensive patterns
Strategy: validation
Validate before calling
if (!inputTuple.has(SingleStoreSchemaTransformWriteProvider.INPUT_TAG)) {
throw new IllegalStateException("Writer input must use INPUT_TAG");
} Prevention
- Always reference the provider's INPUT_TAG constant instead of hardcoding strings.
- Build writer inputs only via PCollectionRowTuple.of(INPUT_TAG, rows).
- Add a small wrapper method that constructs the tuple correctly for your team.
When it happens
Trigger: Calling expand with a PCollectionRowTuple built with a different tag name (e.g. PCollectionRowTuple.of("rows", pc)) or with an empty tuple.
Common situations: Hand-built composition using the wrong tag constant; YAML/Beam pipelines wiring the writer input under an ad-hoc name; refactors renaming the local tag but not the wiring.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- input is expected to be empty
- configuration with is not compatible with a format
- Converting to Beam schema type is not supported
- Failed to get number of partitions in the database
- Failed to validate
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/ec0718090a6b3610.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/io/singlestore/src/main/java/org/apache/beam/sdk/io/singlestore/schematransform/SingleStoreSchemaTransformWriteProvider.java:96
public List<String> outputCollectionNames() {
return Collections.singletonList(OUTPUT_TAG);
}
/**
* An implementation of {@link SchemaTransform} for SingleStoreDB write jobs configured using
* {@link SingleStoreSchemaTransformWriteConfiguration}.
*/
private static class SingleStoreWriteSchemaTransform extends SchemaTransform {
private final SingleStoreSchemaTransformWriteConfiguration configuration;
SingleStoreWriteSchemaTransform(SingleStoreSchemaTransformWriteConfiguration configuration) {
this.configuration = configuration;
}
@Override
public PCollectionRowTuple expand(PCollectionRowTuple input) {
if (!input.has(INPUT_TAG)) {
throw new IllegalArgumentException(
String.format(
"%s %s is missing expected tag: %s",
getClass().getSimpleName(), input.getClass().getSimpleName(), INPUT_TAG));
}
SingleStoreIO.DataSourceConfiguration dataSourceConfiguration =
configuration.getDataSourceConfiguration();
String table = configuration.getTable();
Integer batchSize = configuration.getBatchSize();
SingleStoreIO.Write<Row> write = SingleStoreIO.writeRows();
if (dataSourceConfiguration != null) {
write = write.withDataSourceConfiguration(dataSourceConfiguration);
}
if (table != null && !table.isEmpty()) {
write = write.withTable(table);
}View on GitHub (pinned to 12126d8942)