in bigquery-antipattern-recognition/src/main/java/com/google/zetasql/toolkit/antipattern/util/BigQueryHelper.java [172:186]
public void writeResults(
String processingProject, String outputTable, Map<String, Object> rowContent)
throws IOException {
String[] tableName = outputTable.split("\\.");
TableId tableId = TableId.of(tableName[0], tableName[1], tableName[2]);
InsertAllResponse response =
bigquery.insertAll(InsertAllRequest.newBuilder(tableId).addRow(rowContent).build());
if (response.hasErrors()) {
logger.error(
"Insert into "
+ tableId.toString()
+ " failed, with these errors: "
+ StringUtils.join(response.getInsertErrors()));
}
}