I need to create a repository to work with Bigquery, so when I try to do an update or delete I take the following exception.
UPDATE or DELETE DML statements are not supported over table with streaming buffer
This exception only occurs after I insert something into the table, and the streaming buffer stays open for a long time even without inserting anything. Is it possible to terminate it?
Update Code
String query = "UPDATE " + DATASET_NAME + ".Report"
+ " type = 'AAAAAA'"
+ " WHERE id = 1";
QueryRequest queryRequest =
QueryRequest
.newBuilder(query)
.setUseLegacySql(false)
.build();
Insert Code
Map<String, Object> content = parsePojoToMap(pojo);
content.put("id", id);
InsertAllRequest.RowToInsert row =
InsertAllRequest.RowToInsert
.of(id, content);
InsertAllRequest insertRequest =
InsertAllRequest
.newBuilder(DATASET_NAME, getType().getSimpleName())
.addRow(row)
.build();
InsertAllResponse response = getInstance().insertAll(insertRequest);