{"record":{"id":"ec0718090a6b3610","repo":"apache/beam","slug":"s-s-is-missing-expected-tag-s","errorCode":null,"errorMessage":"%s %s is missing expected tag: %s","messagePattern":"(.+?) (.+?) is missing expected tag: (.+?)","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/singlestore/src/main/java/org/apache/beam/sdk/io/singlestore/schematransform/SingleStoreSchemaTransformWriteProvider.java","lineNumber":96,"sourceCode":"  public List<String> outputCollectionNames() {\n    return Collections.singletonList(OUTPUT_TAG);\n  }\n\n  /**\n   * An implementation of {@link SchemaTransform} for SingleStoreDB write jobs configured using\n   * {@link SingleStoreSchemaTransformWriteConfiguration}.\n   */\n  private static class SingleStoreWriteSchemaTransform extends SchemaTransform {\n    private final SingleStoreSchemaTransformWriteConfiguration configuration;\n\n    SingleStoreWriteSchemaTransform(SingleStoreSchemaTransformWriteConfiguration configuration) {\n      this.configuration = configuration;\n    }\n\n    @Override\n    public PCollectionRowTuple expand(PCollectionRowTuple input) {\n      if (!input.has(INPUT_TAG)) {\n        throw new IllegalArgumentException(\n            String.format(\n                \"%s %s is missing expected tag: %s\",\n                getClass().getSimpleName(), input.getClass().getSimpleName(), INPUT_TAG));\n      }\n      SingleStoreIO.DataSourceConfiguration dataSourceConfiguration =\n          configuration.getDataSourceConfiguration();\n      String table = configuration.getTable();\n      Integer batchSize = configuration.getBatchSize();\n\n      SingleStoreIO.Write<Row> write = SingleStoreIO.writeRows();\n\n      if (dataSourceConfiguration != null) {\n        write = write.withDataSourceConfiguration(dataSourceConfiguration);\n      }\n\n      if (table != null && !table.isEmpty()) {\n        write = write.withTable(table);\n      }","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/singlestore/src/main/java/org/apache/beam/sdk/io/singlestore/schematransform/SingleStoreSchemaTransformWriteProvider.java#L78-L114","documentation":"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.","triggerScenarios":"Calling expand with a PCollectionRowTuple built with a different tag name (e.g. PCollectionRowTuple.of(\"rows\", pc)) or with an empty tuple.","commonSituations":"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.","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."],"exampleFix":"// before\nPCollectionRowTuple.of(\"rows\", rowPc).apply(writeTransform)\n\n// after\nPCollectionRowTuple.of(SingleStoreSchemaTransformWriteProvider.INPUT_TAG, rowPc).apply(writeTransform)","handlingStrategy":"validation","validationCode":"if (!inputTuple.has(SingleStoreSchemaTransformWriteProvider.INPUT_TAG)) {\n  throw new IllegalStateException(\"Writer input must use INPUT_TAG\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["beam","schema-transform","singlestore","tag-mismatch"],"backgroundTag":"missing-required-argument","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}