{"record":{"id":"da47b70d29d20385","repo":"apache/beam","slug":"failure-parsing-tablerow","errorCode":null,"errorMessage":"Failure parsing TableRow","messagePattern":"Failure parsing TableRow","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java","lineNumber":913,"sourceCode":"                  LOG.warn(\n                      \"Failure getting proto descriptor. Successful output will not be produced.\",\n                      e);\n                }\n                if (descriptor != null) {\n                  for (int i = 0; i < c.protoRows.getSerializedRowsCount(); ++i) {\n                    ByteString rowBytes = c.protoRows.getSerializedRowsList().get(i);\n                    try {\n                      TableRow row =\n                          TableRowToStorageApiProto.tableRowFromMessage(\n                              Preconditions.checkStateNotNull(appendClientInfo)\n                                  .getSchemaInformation(),\n                              DynamicMessage.parseFrom(descriptor, rowBytes),\n                              true,\n                              successfulRowsPredicate);\n                      org.joda.time.Instant timestamp = c.timestamps.get(i);\n                      successfulRowsReceiver.outputWithTimestamp(row, timestamp);\n                    } catch (Exception e) {\n                      LOG.warn(\"Failure parsing TableRow\", e);\n                    }\n                  }\n                }\n              }\n            },\n            appendRowsContext);\n        maybeTickleCache();\n        return inserts.getSerializedRowsCount();\n      }\n\n      String retrieveErrorDetails(Iterable<AppendRowsContext> failedContext) {\n        return StreamSupport.stream(failedContext.spliterator(), false)\n            .<@Nullable Throwable>map(AppendRowsContext::getError)\n            .filter(Objects::nonNull)\n            .map(\n                thrw ->\n                    Preconditions.checkStateNotNull(thrw).toString()\n                        + \"\\n\"","sourceCodeStart":895,"sourceCodeEnd":931,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java#L895-L931","documentation":"While emitting successful rows after a Storage Write API append, Beam converts each serialized proto row back into a TableRow (via protoToTableRow). If conversion of any individual row throws, that row is logged with this warning and skipped rather than failing the whole batch — other rows still produce output.","triggerScenarios":"flush() iterates over successfully appended serialized rows and calls protoToTableRow on DynamicMessage.parseFrom(descriptor, rowBytes); any exception (malformed row bytes, conversion bug, unexpected field values) triggers this per-row warning.","commonSituations":"Rows written by a different schema version than the descriptor used for parsing; corrupt or truncated serialized rows; custom proto-to-row conversion edge cases (e.g. unusual timestamp/numeric encodings).","solutions":["Inspect the chained exception to identify the malformed row and field causing conversion failure.","Ensure the descriptor matches the schema used when rows were serialized (avoid mid-stream schema changes, or use schema-consistent destinations).","Configure failed-row routing (withFailedRows/withErrorFn) so bad rows go to an error output instead of being dropped by this path.","Upgrade Beam — protoToTableRow conversion bugs are fixed periodically."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Confirm serialized rows decode with the current descriptor:\ntry { DynamicMessage.parseFrom(descriptor, rowBytes); } catch (Exception e) { /* route to dead-letter */ }","typeGuard":"boolean rowParses(Descriptor d, ByteString bytes) { try { DynamicMessage.parseFrom(d, bytes); return true; } catch (Exception e) { return false; } }","tryCatchPattern":"try { row = protoToTableRow(DynamicMessage.parseFrom(descriptor, rowBytes)); } catch (Exception e) { LOG.warn(\"Failure parsing TableRow\", e); failedRowsReceiver.output(...); }","preventionTips":["Route failures with withFailedRows so malformed rows are captured, not dropped.","Avoid schema changes mid-stream that invalidate serialized rows.","Log row bytes and descriptor version when conversion fails to aid diagnosis."],"tags":["bigquery","storage-api","parsing","protobuf"],"backgroundTag":"protobuf-unmarshal-failed","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"}