0.1.3
Features
BigQuery
-
Resumable uploads via write channel are now supported (#540)
An example of uploading a CSV file in chunks of CHUNK_SIZE bytes:
try (FileChannel fileChannel = FileChannel.open(Paths.get("/path/to/your/file"))) { ByteBuffer buffer = ByteBuffer.allocate(256 * 1024); TableId tableId = TableId.of("YourDataset", "YourTable"); LoadConfiguration configuration = LoadConfiguration.of(tableId, FormatOptions.of("CSV")); WriteChannel writeChannel = bigquery.writer(configuration); long position = 0; long written = fileChannel.transferTo(position, CHUNK_SIZE, writeChannel); while (written > 0) { position += written; written = fileChannel.transferTo(position, CHUNK_SIZE, writeChannel); } writeChannel.close(); }
-
defaultDataset(String dataset)
(inQueryJobInfo
andQueryRequest
) can be used to specify a default dataset (#567).
Storage
- The name of the method to submit a batch request has changed from
apply
tosubmit
(#562).
Fixes
BigQuery
hashCode
andequals
are now overridden in subclasses ofBaseTableInfo
(#565, #573).jobComplete
is renamed tojobCompleted
inQueryResult
(#567).
Datastore
-
The precondition check that cursors are UTF-8 strings has been removed (#578).
-
EntityQuery
,KeyQuery
, andProjectionEntityQuery
classes have been introduced (#585). This enables users to use modify projections and group by clauses for projection entity queries after usingtoBuilder()
. For example, this now works:ProjectionEntityQuery query = Query.projectionEntityQueryBuilder() .kind("Person") .projection(Projection.property("name")) .build(); ProjectionEntityQuery newQuery = query.toBuilder().projection(Projection.property("favorite_food")).build();