.addRow("rowId", rowContent) .build()); if (response.hasErrors()) {
.addRow(builder1.build()) .addRow(builder2.build()) .build(); InsertAllResponse response = bigquery.insertAll(request); assertFalse(response.hasErrors());
.addRow(builder3.build()) .setSkipInvalidRows(true) .build(); InsertAllResponse response = bigquery.insertAll(request); assertTrue(response.hasErrors());
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(TableInfo tableInfo, Iterable<RowToInsert> rows) { return builder(tableInfo.tableId(), rows).build(); }
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(String datasetId, String tableId, RowToInsert... rows) { return newBuilder(datasetId, tableId, rows).build(); }
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(TableInfo tableInfo, RowToInsert... rows) { return builder(tableInfo.tableId(), rows).build(); }
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(TableId tableId, Iterable<RowToInsert> rows) { return builder(tableId, rows).build(); }
.setIgnoreUnknownValues(true) .setTemplateSuffix("suffix") .build(); TableDataInsertAllRequest requestPb = new TableDataInsertAllRequest()
.addRow(builder2.build()) .setTemplateSuffix("_suffix") .build(); InsertAllResponse response = bigquery.insertAll(request); assertFalse(response.hasErrors());
.setSkipInvalidRows(skipInvalidRows) .setIgnoreUnknownValues(ignoreUnknownValues) .build(); return bigquery.insertAll(request);
.setIgnoreUnknownValues(true) .setTemplateSuffix("suffix") .build(); TableDataInsertAllRequest requestPb = new TableDataInsertAllRequest()
.setIgnoreUnknownValues(true) .setTemplateSuffix("suffix") .build(); TableDataInsertAllRequest requestPb = new TableDataInsertAllRequest()
.setIgnoreUnknownValues(true) .setTemplateSuffix("suffix") .build(); TableDataInsertAllRequest requestPb = new TableDataInsertAllRequest()
InsertAllRequest.newBuilder(tableId).addRow(firstRow).addRow(secondRow).build();
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(String datasetId, String tableId, RowToInsert... rows) { return newBuilder(datasetId, tableId, rows).build(); }
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(TableId tableId, Iterable<RowToInsert> rows) { return newBuilder(tableId, rows).build(); }
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(TableInfo tableInfo, Iterable<RowToInsert> rows) { return newBuilder(tableInfo.getTableId(), rows).build(); }
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(String datasetId, String tableId, Iterable<RowToInsert> rows) { return newBuilder(datasetId, tableId, rows).build(); }
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(TableInfo tableInfo, RowToInsert... rows) { return newBuilder(tableInfo.getTableId(), rows).build(); }
/** * Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. */ public static InsertAllRequest of(TableId tableId, RowToInsert... rows) { return newBuilder(tableId, rows).build(); }