Skip to content

Commit 6106b30

Browse files
authored
[BigQueryIO] Include insert error in log message if TableRow parsing fails (#38231)
* Include insert error in log message
1 parent a4c7944 commit 6106b30

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,10 @@ long flush(
760760
error.getRowIndexToErrorMessage().get(failedIndex),
761761
tableDestination.getTableReference());
762762
} catch (Exception e) {
763-
LOG.error("Failed to insert row and could not parse the result!", e);
763+
LOG.error(
764+
"Failed to insert row and could not parse the result! Insert error: {}.",
765+
error.getRowIndexToErrorMessage().get(failedIndex),
766+
e);
764767
}
765768
// output outside try {} clause to avoid suppress downstream Exception
766769
if (element != null) {

0 commit comments

Comments
 (0)