Skip to content

Commit

Permalink
Bigquery : Fix close write channel (#4924)
Browse files Browse the repository at this point in the history
* close write channel

* Update BigQuerySnippets.java

* Update BigQuerySnippets.java

* Update BigQuerySnippets.java
  • Loading branch information
abhinav-qlogic authored and sduskis committed Apr 8, 2019
1 parent 5c16ac2 commit dd6d7d7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ public long writeFileToTable(String datasetName, String tableName, Path csvPath,
// Write data to writer
try (OutputStream stream = Channels.newOutputStream(writer)) {
Files.copy(csvPath, stream);
} finally {
writer.close();
}
// Get load job
Job job = writer.getJob();
Expand Down

0 comments on commit dd6d7d7

Please sign in to comment.