-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: docsImprovement to the documentation for an API.Improvement to the documentation for an API.
Description
File: google-cloud-java/google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java
Issue: (at Line: 430)
In the example of writing a local file to a table (public long writeFileToTable(String datasetName, String tableName, Path csvPath, String location) throws IOException, InterruptedException, TimeoutException), TableDataWriteChannel needs to be closed.
Solution: replace line 428-430 with the following code snippet:
try (OutputStream stream = Channels.newOutputStream(writer)) { Files.copy(csvPath, stream); } finally { writer.close(); }
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: docsImprovement to the documentation for an API.Improvement to the documentation for an API.